From: Tobias Burnus Date: Thu, 18 Jun 2009 20:06:04 +0000 (+0200) Subject: re PR bootstrap/40061 (Bootstrap failure in dwarf2out.c, function add_subscript_info... X-Git-Tag: releases/gcc-4.3.4~124 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d3accd44743314bb91f516af233589ef2d210181;p=thirdparty%2Fgcc.git re PR bootstrap/40061 (Bootstrap failure in dwarf2out.c, function add_subscript_info: 'dimension_number' undefined) 2009-06-18 Tobias Burnus Mikael Pettersson PR debug/40061 * dwarf2out.c (add_subscript_info): Fix build for MIPS_DEBUGGING_INFO. Co-Authored-By: Mikael Pettersson From-SVN: r148668 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 63cbce188ea2..d0cfb4925d91 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2009-06-18 Tobias Burnus + Mikael Pettersson + + PR debug/40061 + * dwarf2out.c (add_subscript_info): Fix build for + MIPS_DEBUGGING_INFO. + 2009-06-17 Richard Guenther Backport from mainline diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 63d93a24b013..f8944e4e0f8f 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -11297,7 +11297,9 @@ add_bound_info (dw_die_ref subrange_die, enum dwarf_attribute bound_attr, tree b 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, tree type) 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