This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[4.3] PR bootstrap/40061 - fix dwarf2out.c if MIPS_DEBUGGING_INFO is defined
- From: Tobias Burnus <burnus at net-b dot de>
- To: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 12 May 2009 00:51:42 +0200
- Subject: [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