Re: [ping] pending patches

2016-01-19 Thread Eric Botcazou
> 2016-01-05  Eric Botcazou  
> 
>   * dwarf2out.c (need_endianity_attribute_p): New inline predicate.
>   (base_type_die): Add REVERSE parameter and attach DW_AT_endianity to
>   the DIE accordingly.
>   (modified_type_die): Add REVERSE parameter and pass it recursively,
>   as well as to base_type_die.  Adjust presence check accordingly.
>   (base_type_for_mode): Adjust call to modified_type_die.
>   (add_type_attribute): Add REVERSE parameter and pass it to
>   modified_type_die.
>   (generic_parameter_die): Adjust call to add_type_attribute.
>   (add_scalar_info): Likewise.
>   (add_subscript_info): Likewise.
>   (gen_array_type_die): Likewise.
>   (gen_descr_array_type_die): Likewise.
>   (gen_entry_point_die): Likewise.
>   (gen_enumeration_type_die): Likewise.
>   (gen_formal_parameter_die): Likewise.
>   (gen_subprogram_die): Likewise.
>   (gen_variable_die ): Likewise.
>   (gen_const_die): Likewise.
>   (gen_field_die): Likewise.
>   (gen_pointer_type_die): Likewise.
>   (gen_reference_type_die): Likewise.
>   (gen_ptr_to_mbr_type_die): Likewise.
>   (gen_inheritance_die): Likewise.
>   (gen_subroutine_type_die): Likewise.
>   (gen_typedef_die): Likewise.
>   (force_type_die): Adjust call to modified_type_die.
> 
> 2016-01-05  Eric Botcazou  
> 
>   * gcc.dg/debug/dwarf2/sso.c: New test.

https://gcc.gnu.org/ml/gcc-patches/2016-01/msg00132.html

-- 
Eric Botcazou


Re: [ping] pending patches

2016-01-19 Thread Jason Merrill

On 01/05/2016 04:30 AM, Eric Botcazou wrote:

It doesn't look to me like DW_AT_endianity is applicable to array types
or members in DWARF 3/4; instead, it should be applied to the underlying
base type.


OK, the attached patch does that so is more invasive as expected.


Please document the reverse parameter to modified_type_die.  OK with 
that change.


Jason




Re: [ping] pending patches

2016-01-07 Thread Bernd Schmidt

On 01/06/2016 08:15 PM, David Malcolm wrote:

[PATCH 1/4] PR c++/62314: add fixit hint for missing "template <> " in
explicit specialization:
   https://gcc.gnu.org/ml/gcc-patches/2015-12/msg01933.html


[PATCH 2/4] PR c++/62314: add fixit hint for "expected ';' after class
definition:
   https://gcc.gnu.org/ml/gcc-patches/2015-12/msg01935.html


[PATCH 3/4] PR c++/62314: C++: add fixit hint to misspelled member
names:
   https://gcc.gnu.org/ml/gcc-patches/2015-12/msg01936.html


[PATCH 4/4] C: add fixit hint to misspelled field names:
   https://gcc.gnu.org/ml/gcc-patches/2015-12/msg01934.html


My gut feeling on these is that they should wait for the next stage 1 at 
this point.



Bernd



[ping] pending patches

2016-01-06 Thread David Malcolm
PR c++/68795: fix uninitialized close_paren_loc in
cp_parser_postfix_expression (v2):
  https://gcc.gnu.org/ml/gcc-patches/2015-12/msg01915.html


[PATCH 1/4] PR c++/62314: add fixit hint for missing "template <> " in
explicit specialization:
  https://gcc.gnu.org/ml/gcc-patches/2015-12/msg01933.html


[PATCH 2/4] PR c++/62314: add fixit hint for "expected ';' after class
definition:
  https://gcc.gnu.org/ml/gcc-patches/2015-12/msg01935.html


[PATCH 3/4] PR c++/62314: C++: add fixit hint to misspelled member
names:
  https://gcc.gnu.org/ml/gcc-patches/2015-12/msg01936.html


[PATCH 4/4] C: add fixit hint to misspelled field names:
  https://gcc.gnu.org/ml/gcc-patches/2015-12/msg01934.html


[PATCH] C++ FE: Show both locations in string literal concatenation
error:
  https://gcc.gnu.org/ml/gcc-patches/2015-12/msg01497.html



Thanks in advance
Dave




Re: [ping] pending patches

2016-01-05 Thread Eric Botcazou
> It doesn't look to me like DW_AT_endianity is applicable to array types
> or members in DWARF 3/4; instead, it should be applied to the underlying
> base type.

OK, the attached patch does that so is more invasive as expected.

Tested on x86_64-suse-linux, OK for the mainline?


2016-01-05  Eric Botcazou  

* dwarf2out.c (need_endianity_attribute_p): New inline predicate.
(base_type_die): Add REVERSE parameter and attach DW_AT_endianity to
the DIE accordingly.
(modified_type_die): Add REVERSE parameter and pass it recursively,
as well as to base_type_die.  Adjust presence check accordingly.
(base_type_for_mode): Adjust call to modified_type_die.
(add_type_attribute): Add REVERSE parameter and pass it to
modified_type_die.
(generic_parameter_die): Adjust call to add_type_attribute.
(add_scalar_info): Likewise.
(add_subscript_info): Likewise.
(gen_array_type_die): Likewise.
(gen_descr_array_type_die): Likewise.
(gen_entry_point_die): Likewise.
(gen_enumeration_type_die): Likewise.
(gen_formal_parameter_die): Likewise.
(gen_subprogram_die): Likewise.
(gen_variable_die ): Likewise.
(gen_const_die): Likewise.
(gen_field_die): Likewise.
(gen_pointer_type_die): Likewise.
(gen_reference_type_die): Likewise.
(gen_ptr_to_mbr_type_die): Likewise.
(gen_inheritance_die): Likewise.
(gen_subroutine_type_die): Likewise.
(gen_typedef_die): Likewise.
(force_type_die): Adjust call to modified_type_die.

2016-01-05  Eric Botcazou  

* gcc.dg/debug/dwarf2/sso.c: New test.

-- 
Eric BotcazouIndex: dwarf2out.c
===
--- dwarf2out.c	(revision 232035)
+++ dwarf2out.c	(working copy)
@@ -3286,11 +3286,11 @@ static void output_ranges (void);
 static dw_line_info_table *new_line_info_table (void);
 static void output_line_info (bool);
 static void output_file_names (void);
-static dw_die_ref base_type_die (tree);
+static dw_die_ref base_type_die (tree, bool);
 static int is_base_type (tree);
 static dw_die_ref subrange_type_die (tree, tree, tree, tree, dw_die_ref);
 static int decl_quals (const_tree);
-static dw_die_ref modified_type_die (tree, int, dw_die_ref);
+static dw_die_ref modified_type_die (tree, int, bool, dw_die_ref);
 static dw_die_ref generic_parameter_die (tree, tree, bool, dw_die_ref);
 static dw_die_ref template_parameter_pack_die (tree, tree, dw_die_ref);
 static int type_is_enum (const_tree);
@@ -3362,7 +3362,7 @@ static dw_die_ref scope_die_for (tree, d
 static inline int local_scope_p (dw_die_ref);
 static inline int class_scope_p (dw_die_ref);
 static inline int class_or_namespace_scope_p (dw_die_ref);
-static void add_type_attribute (dw_die_ref, tree, int, dw_die_ref);
+static void add_type_attribute (dw_die_ref, tree, int, bool, dw_die_ref);
 static void add_calling_convention_attribute (dw_die_ref, tree);
 static const char *type_tag (const_tree);
 static tree member_declared_type (const_tree);
@@ -10796,14 +10796,23 @@ output_line_info (bool prologue_only)
   ASM_OUTPUT_LABEL (asm_out_file, l2);
 }
 
+/* Return true if DW_AT_endianity should be emitted according to REVERSE.  */
+
+static inline bool
+need_endianity_attribute_p (bool reverse)
+{
+  return reverse && (dwarf_version >= 3 || !dwarf_strict);
+}
+
 /* Given a pointer to a tree node for some base type, return a pointer to
-   a DIE that describes the given type.
+   a DIE that describes the given type.  REVERSE is true if this type is
+   to be interpreted in reverse storage order wrt to the target order.
 
This routine must only be called for GCC type nodes that correspond to
Dwarf base (fundamental) types.  */
 
 static dw_die_ref
-base_type_die (tree type)
+base_type_die (tree type, bool reverse)
 {
   dw_die_ref base_type_result;
   enum dwarf_type encoding;
@@ -10912,6 +10921,10 @@ base_type_die (tree type)
 		   int_size_in_bytes (type));
   add_AT_unsigned (base_type_result, DW_AT_encoding, encoding);
 
+  if (need_endianity_attribute_p (reverse))
+add_AT_unsigned (base_type_result, DW_AT_endianity,
+		 BYTES_BIG_ENDIAN ? DW_END_little : DW_END_big);
+
   if (fpt_used)
 {
   switch (fpt_info.scale_factor_kind)
@@ -10948,12 +10961,14 @@ base_type_die (tree type)
 	  gcc_unreachable ();
 	}
 }
-  if (type_bias != NULL)
+
+  if (type_bias)
 add_scalar_info (base_type_result, DW_AT_GNU_bias, type_bias,
 		 dw_scalar_form_constant
 		 | dw_scalar_form_exprloc
 		 | dw_scalar_form_reference,
 		 NULL);
+
   add_pubtype (type, base_type_result);
 
   return base_type_result;
@@ -11138,7 +11153,8 @@ get_nearest_type_subqualifiers (tree typ
entry that chains various modifiers in front of the given type.  */
 
 static dw_die_ref
-modified_type_die (tree type, int cv_quals, 

Re: [ping] pending patches

2015-12-07 Thread Jim Wilson
On 12/01/2015 11:58 PM, Eric Botcazou wrote:
> IA-64 (stack checking improvement):
>   https://gcc.gnu.org/ml/gcc-patches/2015-11/msg01604.html

OK.

Jim



Re: [ping] pending patches

2015-12-02 Thread Jason Merrill

On 12/02/2015 02:58 AM, Eric Botcazou wrote:

DWARF-2 (debug info for Scalar_Storage_Order attribute):
   https://gcc.gnu.org/ml/gcc-patches/2015-11/msg01659.html


It doesn't look to me like DW_AT_endianity is applicable to array types 
or members in DWARF 3/4; instead, it should be applied to the underlying 
base type.



C++ (PR 68290: internal error with concepts):
   https://gcc.gnu.org/ml/gcc-patches/2015-11/msg03301.html


OK, thanks.

Jason



DW_AT_endianity (was Re: [ping] pending patches)

2015-12-02 Thread Jason Merrill

On 12/02/2015 11:44 AM, Eric Botcazou wrote:

It doesn't look to me like DW_AT_endianity is applicable to array types
or members in DWARF 3/4; instead, it should be applied to the underlying
base type.


Yeah, I agreed but Jakub didn't and I trust him more than myself here. :-)
   https://gcc.gnu.org/ml/gcc/2015-06/msg00143.html
   https://gcc.gnu.org/ml/gcc/2015-06/msg00144.html
   https://gcc.gnu.org/ml/gcc/2015-06/msg00147.html



For the C family of languages where array types are not first-class citizens,
the SSO attribute simply cannot be supported on array types.  But for other
languages, like Ada, where they are, it can and it is supported on the branch,
so you can declare an array of 4 integers with big-endian storage order.


OK, but why not represent this as an array of big-endian integers?

Jason



Re: [ping] pending patches

2015-12-02 Thread Eric Botcazou
> It doesn't look to me like DW_AT_endianity is applicable to array types
> or members in DWARF 3/4; instead, it should be applied to the underlying
> base type.

Yeah, I agreed but Jakub didn't and I trust him more than myself here. :-)
  https://gcc.gnu.org/ml/gcc/2015-06/msg00143.html
  https://gcc.gnu.org/ml/gcc/2015-06/msg00144.html
  https://gcc.gnu.org/ml/gcc/2015-06/msg00147.html

-- 
Eric Botcazou


[ping] pending patches

2015-12-01 Thread Eric Botcazou
IA-64 (stack checking improvement):
  https://gcc.gnu.org/ml/gcc-patches/2015-11/msg01604.html

MIPS (stack checking improvement):
  https://gcc.gnu.org/ml/gcc-patches/2015-11/msg01602.html

Aarch64 (stack checking implementation):
  https://gcc.gnu.org/ml/gcc-patches/2015-11/msg01988.html

DWARF-2 (debug info for Scalar_Storage_Order attribute):
  https://gcc.gnu.org/ml/gcc-patches/2015-11/msg01659.html

C++ (PR 68290: internal error with concepts):
  https://gcc.gnu.org/ml/gcc-patches/2015-11/msg03301.html

Thanks in advance.

-- 
Eric Botcazou