https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77847
Bug ID: 77847 Summary: PowerPC big endian power7/power8 do not bootstrap due to fall through error Product: gcc Version: 7.0 Status: UNCONFIRMED Severity: blocker Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: meissner at gcc dot gnu.org Target Milestone: --- If you build a big endian GCC compiler using the --with-cpu=power7 or --with-cpu=power8 option, it will fail to bootstrap: make[3]: Entering directory `/home/meissner/fsf-build-ppc64/trunk-240752/libcpp' /home/meissner/fsf-build-ppc64/trunk-240752/./prev-gcc/xg++ -B/home/meissner/fsf-build-ppc64/trunk-240752/./prev-gcc/ -B/home/meissner/fsf-install-ppc64/trunk-240752/powerpc64-unknown-linux-gnu/bin/ -nostdinc++ -B/home/meissner/fsf-build-ppc64/trunk-240752/prev-powerpc64-unknown-linux-gnu/libstdc++-v3/src/.libs -B/home/meissner/fsf-build-ppc64/trunk-240752/prev-powerpc64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs -I/home/meissner/fsf-build-ppc64/trunk-240752/prev-powerpc64-unknown-linux-gnu/libstdc++-v3/include/powerpc64-unknown-linux-gnu -I/home/meissner/fsf-build-ppc64/trunk-240752/prev-powerpc64-unknown-linux-gnu/libstdc++-v3/include -I/home/meissner/fsf-src/trunk-240752/libstdc++-v3/libsupc++ -L/home/meissner/fsf-build-ppc64/trunk-240752/prev-powerpc64-unknown-linux-gnu/libstdc++-v3/src/.libs -L/home/meissner/fsf-build-ppc64/trunk-240752/prev-powerpc64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs -I/home/meissner/fsf-src/trunk-240752/libcpp -I. -I/home/meissner/fsf-src/trunk-240752/libcpp/../include -I/home/meissner/fsf-src/trunk-240752/libcpp/include -g -O2 -gtoggle -W -Wall -Wno-narrowing -Wwrite-strings -Wmissing-format-attribute -pedantic -Wno-long-long -Werror -fno-exceptions -fno-rtti -I/home/meissner/fsf-src/trunk-240752/libcpp -I. -I/home/meissner/fsf-src/trunk-240752/libcpp/../include -I/home/meissner/fsf-src/trunk-240752/libcpp/include -c -o lex.o -MT lex.o -MMD -MP -MF .deps/lex.Tpo /home/meissner/fsf-src/trunk-240752/libcpp/lex.c /home/meissner/fsf-src/trunk-240752/libcpp/lex.c: In function ‘const uchar* search_line_fast(const uchar*, const uchar*)’: /home/meissner/fsf-src/trunk-240752/libcpp/lex.c:735:4: error: this statement may fall through [-Werror=implicit-fallthrough] s += sizeof(unsigned long); ~~^~~~~~~~~~ /home/meissner/fsf-src/trunk-240752/libcpp/lex.c:736:7: note: here case 2: ^~~~ cc1plus: all warnings being treated as errors make[3]: *** [lex.o] Error 1 make[3]: Leaving directory `/home/meissner/fsf-build-ppc64/trunk-240752/libcpp' make[2]: *** [all-stage2-libcpp] Error 2 make[2]: Leaving directory `/home/meissner/fsf-build-ppc64/trunk-240752' make[1]: *** [stage2-bubble] Error 2 make[1]: Leaving directory `/home/meissner/fsf-build-ppc64/trunk-240752' make: *** [all] Error 2 The reason is code in lex.c that is optimized to use the Altivec instructions does not have the proper fall through markers. Note, this particular code is only enabled if it is on a PowerPC, the Altivec instructions are available (i.e. --with-cpu=power7 or --with-cpu=power8), and the target is big endian.