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 debug/40061] Really fix debug2out.c to allow bootstrapping on MIPS_DEBUGGING_INFO systems


New attempt to finally fix PR 40061.

The patch has been successfully build and regtested on x86-64-linux and
I think it is relatively obvious. Still, I would prefer if someone on a
MIPS_DEBUGGING_INFO can confirm that it finally fixes the problem.
Otherwise, I will try to setup a cross compiler.

OK for 4.3 if it survives bootstrapping on a MIPS_DEBUGGING_INFO system?

Tobias

PS: I somehow missed the bugzilla emails around 27 May (PR 40248) - sorry.
2009-06-18  Tobias Burnus  <burnus@net-b.de> 
	    Mikael Pettersson  <mikpe@it.uu.se>

	PR debug/40061
	* dwarf2out.c (add_subscript_info): Fix build for
	MIPS_DEBUGGING_INFO.

Index: gcc/dwarf2out.c
===================================================================
--- gcc/dwarf2out.c	(Revision 148569)
+++ gcc/dwarf2out.c	(Arbeitskopie)
@@ -11297,7 +11297,9 @@ 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;
 
@@ -11315,17 +11317,18 @@ add_subscript_info (dw_die_ref type_die,
      We work around this by disabling this feature.  See also
      gen_array_type_die.  */
 
-  dimension_number = 0;
 #ifndef MIPS_DEBUGGING_INFO
-  for ( ; 
+  for (dimension_number = 0; 
        TREE_CODE (type) == ARRAY_TYPE;
        type = TREE_TYPE (type), dimension_number++)
 #endif
     {
       tree domain = TYPE_DOMAIN (type);
 
+#ifndef MIPS_DEBUGGING_INFO
       if (TYPE_STRING_FLAG (type) && is_fortran () && dimension_number > 0)
 	break;
+#endif
 
       /* Arrays come in three flavors: Unspecified bounds, fixed bounds,
 	 and (in GNU C only) variable bounds.  Handle all three forms

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