This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[4.3] PR bootstrap/40061 - fix dwarf2out.c if MIPS_DEBUGGING_INFO is defined


The patch for 4.3 (only) is close to being obvious and fixes a bootstrap
regresson on systems where MIPS_DEBUGGING_INFO is set; the regression
was caused by the patch for PR fortran/39791.

Jakub wrote: "for MIPS_DEBUGGING_INFO you should assume dimension_number
is always 0 (SGI dwarf reader didn't handle multidimensional arrays)."

Build on x86_64-linux. OK if it survives the bootstrapping and regtesting?

Tobias

    PR bootstrap/40061
    * dwarf2.out.c (add_subscript_info): Initialize dimension for
MIPS_DEBUGGING_INFO.

Index: dwarf2out.c
===================================================================
--- dwarf2out.c (Revision 147267)
+++ dwarf2out.c (Arbeitskopie)
@@ -11297,9 +11297,7 @@ add_bound_info (dw_die_ref subrange_die,
 static void
 add_subscript_info (dw_die_ref type_die, tree type)
 {
-#ifndef MIPS_DEBUGGING_INFO
   unsigned dimension_number;
-#endif
   tree lower, upper;
   dw_die_ref subrange_die;

@@ -11316,8 +11314,10 @@ add_subscript_info (dw_die_ref type_die,
      const enum type.  E.g. const enum machine_mode insn_operand_mode[2][10].
      We work around this by disabling this feature.  See also
      gen_array_type_die.  */
+
+  dimension_number = 0;
 #ifndef MIPS_DEBUGGING_INFO
-  for (dimension_number = 0;
+  for ( ;
        TREE_CODE (type) == ARRAY_TYPE;
        type = TREE_TYPE (type), dimension_number++)
 #endif


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]