gmake[3]: Entering directory `/usr/ports/lang/gcc43/work/build/gcc' gcc43 -c -g -fkeep-inline-functions -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common -DHAVE_CONFIG_H -I. -I. -I.././..//gcc-4.3-20090503/gcc -I.././..//gcc-4.3-20090503/gcc/. -I.././..//gcc-4.3-20090503/gcc/../include -I.././..//gcc-4.3-20090503/gcc/../libcpp/include -I/usr/local/include -I.././..//gcc-4.3-20090503/gcc/../libdecnumber -I.././..//gcc-4.3-20090503/gcc/../libdecnumber/dpd -I../libdecnumber -I/usr/local/include .././..//gcc-4.3-20090503/gcc/dwarf2out.c -o dwarf2out.o .././..//gcc-4.3-20090503/gcc/dwarf2out.c: In function 'add_subscript_info': .././..//gcc-4.3-20090503/gcc/dwarf2out.c:11327: error: 'dimension_number' undeclared (first use in this function) .././..//gcc-4.3-20090503/gcc/dwarf2out.c:11327: error: (Each undeclared identifier is reported only once .././..//gcc-4.3-20090503/gcc/dwarf2out.c:11327: error: for each function it appears in.) .././..//gcc-4.3-20090503/gcc/dwarf2out.c:11328: error: break statement not within loop or switch gmake[3]: *** [dwarf2out.o] Error 1 I believe this is caused by 2009-04-24 Tobias Burnus <burnus@net-b.de> PR fortran/39791 Backport from mainline: 2008-08-22 Jakub Jelinek <jakub@redhat.com> * dwarf2out.c (add_subscript_info): Stop on Fortran TYPE_STRING_FLAG types. (gen_array_type_die): Emit DW_TAG_string_type for Fortran character types.
Confirmed. I need to understand what MIPS_DEBUGGING_INFO means - and why it is not present in 4.4 - but maybe reverting it and suggesting in PR fortran/39791 to use 4.4/4.5 is be safer/better alternative. - Thanks for the report!
Stupid but working fix: Reverting the patch for PR 39791 on MIPS_DEBUGGING_INFO only. I think that's the safest to do - even if it is not the most elegant way of doing it. I don't like backporting Rev. 137975 which would be the proper fix as one probably would need more modifications, risking regressions - and that does not seem to be worthwile for PR 39791 on 4.3.x. --- dwarf2out.c (revision 147216) +++ dwarf2out.c (working copy) @@ -11324,8 +11324,11 @@ { tree domain = TYPE_DOMAIN (type); +#ifndef MIPS_DEBUGGING_INFO + /* See PR bootstrap/40061 for the ifndef */ 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
This patch is correct. Alternatively, you could define the dimension_number variable unconditionally (remove #ifndef and #endif around it), initialize it to 0 and not initialize it in for init expression. For MIPS_DEBUGGING_INFO, dimension_number is never > 0 in the body of the for cycle in 4.4+...
Subject: Bug 40061 Author: burnus Date: Tue May 12 19:26:46 2009 New Revision: 147445 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=147445 Log: 2009-05-12 Tobias Burnus <burnus@net-b.de> PR bootstrap/40061 * dwarf2.out.c (add_subscript_info): Initialize dimension for MIPS_DEBUGGING_INFO. Modified: branches/gcc-4_3-branch/gcc/ChangeLog branches/gcc-4_3-branch/gcc/dwarf2out.c
FIXED on the 4.3 branch. Thanks for reporting the problem and sorry for the breakage.
*** Bug 40268 has been marked as a duplicate of this bug. ***
(In reply to comment #5) > FIXED on the 4.3 branch. Thanks for reporting the problem and sorry for the > breakage. Not really, see PR 40268 for description and proposed patch. Confirmed fail on cross to alpha-linux-gnu.
*** Bug 40477 has been marked as a duplicate of this bug. ***
Still broken. Please fix ASAP.
Subject: Bug 40061 Author: burnus Date: Thu Jun 18 20:06:04 2009 New Revision: 148668 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=148668 Log: 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. Modified: branches/gcc-4_3-branch/gcc/ChangeLog branches/gcc-4_3-branch/gcc/dwarf2out.c
Hopefully now really FIXED.