https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66930
Bug ID: 66930 Summary: [5 Regression]: gengtype.c is miscompiled during stage2 Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: glaubitz at physik dot fu-berlin.de CC: doko at gcc dot gnu.org, kkojima at gcc dot gnu.org, olegendo at gcc dot gnu.org Target Milestone: --- Target: sh*-*-* Hello! As previously discussed in private mail, I am now filing a bug report for the regression in gcc-5 that was introduced somewhere between r222550 and r225710 which leads to the miscompilation of gcc/gengtype.c when building a native compiler on SH [1]: /«PKGBUILDDIR»/build/./prev-gcc/xg++ -B/«PKGBUILDDIR»/build/./prev-gcc/ -B/usr/sh4-linux-gnu/bin/ -nostdinc++ -B/«PKGBUILDDIR»/build/prev-sh4-linux-gnu/libstdc++-v3/src/.libs -B/«PKGBUILDDIR»/build/prev-sh4-linux-gnu/libstdc++-v3/libsupc++/.libs -I/«PKGBUILDDIR»/build/prev-sh4-linux-gnu/libstdc++-v3/include/sh4-linux-gnu -I/«PKGBUILDDIR»/build/prev-sh4-linux-gnu/libstdc++-v3/include -I/«PKGBUILDDIR»/src/libstdc++-v3/libsupc++ -L/«PKGBUILDDIR»/build/prev-sh4-linux-gnu/libstdc++-v3/src/.libs -L/«PKGBUILDDIR»/build/prev-sh4-linux-gnu/libstdc++-v3/libsupc++/.libs -c -DIN_GCC_FRONTEND -g -O1 -gtoggle -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -I. -Ic -I../../src/gcc -I../../src/gcc/c -I../../src/gcc/../include -I../../src/gcc/../libcpp/include -I../../src/gcc/../libdecnumber -I../../src/gcc/../libdecnumber/dpd -I../libdecnumber -I../../src/gcc/../libbacktrace -o c/c-objc-common.o -MT c/c-objc-common.o -MMD -MP -MF c/.deps/c-objc-common.TPo ../../src/gcc/c/c-objc-common.c /«PKGBUILDDIR»/build/./prev-gcc/xg++ -B/«PKGBUILDDIR»/build/./prev-gcc/ -B/usr/sh4-linux-gnu/bin/ -nostdinc++ -B/«PKGBUILDDIR»/build/prev-sh4-linux-gnu/libstdc++-v3/src/.libs -B/«PKGBUILDDIR»/build/prev-sh4-linux-gnu/libstdc++-v3/libsupc++/.libs -I/«PKGBUILDDIR»/build/prev-sh4-linux-gnu/libstdc++-v3/include/sh4-linux-gnu -I/«PKGBUILDDIR»/build/prev-sh4-linux-gnu/libstdc++-v3/include -I/«PKGBUILDDIR»/src/libstdc++-v3/libsupc++ -L/«PKGBUILDDIR»/build/prev-sh4-linux-gnu/libstdc++-v3/src/.libs -L/«PKGBUILDDIR»/build/prev-sh4-linux-gnu/libstdc++-v3/libsupc++/.libs -c -DIN_GCC_FRONTEND -g -O1 -gtoggle -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -I. -Ic -I../../src/gcc -I../../src/gcc/c -I../../src/gcc/../include -I../../src/gcc/../libcpp/include -I../../src/gcc/../libdecnumber -I../../src/gcc/../libdecnumber/dpd -I../libdecnumber -I../../src/gcc/../libbacktrace -o c/c-parser.o -MT c/c-parser.o -MMD -MP -MF c/.deps/c-parser.TPo ../../src/gcc/c/c-parser.c In file included from ../../src/gcc/c/c-parser.c:15558:0: ./gt-c-c-parser.h: In function 'void gt_ggc_mx_c_parser(void*)': ./gt-c-c-parser.h:41:7: error: break statement not within loop or switch break; ^ ./gt-c-c-parser.h:42:9: error: break statement not within loop or switch break; ^ (...) I am currently trying to pinpoint in which SVN snapshot the issue was introduced since previous snapshots did not suffer from this bug [2]. To make sure it's not an issue with the host compiler, I am currently doing testbuilds on my SH7785LCR board of various SVN snapshots to gather more build logs which should hopefully help to identify the change responsible for the regression. These logs are collected in [3]. Cheers, Adrian > [1] > http://buildd.debian-ports.org/status/fetch.php?pkg=gcc-5&arch=sh4&ver=5.1.1-2&stamp=1430520056 > [2] > http://buildd.debian-ports.org/status/fetch.php?pkg=gcc-5&arch=sh4&ver=5.1.1-14&stamp=1436979741 > [3] https://people.debian.org/~glaubitz/sh4-gcc-5-tests/