It seems that gcc-4_0-branch GCC (both 20050228 and 20050303) miscompiles libcpp/macro.c if compiled at -O1 and higher. stage1 compiler built that way dies with: /usr/include/bits/stdio.h: In function printf': /usr/include/bits/stdio.h:36: error: syntax error before _restrict__' /usr/include/bits/stdio.h: In function etchar': /usr/include/bits/stdio.h:43: error: syntax error before _restrict__' /usr/include/bits/stdio.h: In function etchar_unlocked': /usr/include/bits/stdio.h:59: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://bugzilla.redhat.com/bugzilla> for instructions.
when compiling crtstuff.c. If libcpp/macro.c is built at -O0 or built with GCC 3.3.4 rather than gcc-4_0-branch, it works just fine. I'll try to locate the problematic routine and distill a testcase. -- Summary: Miscompilation of libcpp/macro.c at -O1 and higher Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: bootstrap AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jakub at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org GCC target triplet: s390x-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20305