http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53913
Bug #: 53913 Summary: [4.8 regression] resource.c:1179:5: error: 'current_function_decl' undeclared broke m68k bootstrap Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: bootstrap AssignedTo: unassig...@gcc.gnu.org ReportedBy: mi...@it.uu.se Attempting to build gcc-4.8-20120708 for m68k-linux fails with: gcc -c -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wc++-compat -DHAVE_CONFIG_H -I. -I. -I/tmp/gcc-4.8-20120708/gcc -I/tmp/gcc-4.8-20120708/gcc/. -I/tmp/gcc-4.8-20120708/gcc/../include -I/tmp/gcc-4.8-20120708/gcc/../libcpp/include -I/home/mikpe/pkgs/linux-x86_64/gmp-5.0.5/include -I/home/mikpe/pkgs/linux-x86_64/mpfr-3.1.1/include -I/home/mikpe/pkgs/linux-x86_64/mpc-0.9/include -I/tmp/gcc-4.8-20120708/gcc/../libdecnumber -I/tmp/gcc-4.8-20120708/gcc/../libdecnumber/dpd -I../libdecnumber /tmp/gcc-4.8-20120708/gcc/resource.c -o resource.o /tmp/gcc-4.8-20120708/gcc/resource.c: In function 'init_resource_info': /tmp/gcc-4.8-20120708/gcc/resource.c:1179:5: error: 'current_function_decl' undeclared (first use in this function) /tmp/gcc-4.8-20120708/gcc/resource.c:1179:5: note: each undeclared identifier is reported only once for each function it appears in make[2]: *** [resource.o] Error 1 make[2]: Leaving directory `/tmp/objdir/gcc' make[1]: *** [all-gcc] Error 2 make[1]: Leaving directory `/tmp/objdir' make: *** [all] Error 2 Line 1175 is the conditional occurrence of EPILOGUE_USES(i). The m68k definition of EPILOGUE_USES references current_function_decl, and apparently nothing brings in the needed header (tree.h) to resource.c any more. 4.8-20120701 builds fine, so this is a recent regression. Appending an #include "tree.h" to the include block at the start of resource.c makes a cross-build work, but that may not be the preferred fix.