This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug bootstrap/20305] [4.0/4.1 Regression] Miscompilation of libcpp/macro.c at -O1 and higher
- From: "jakub at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Mar 2005 20:10:55 -0000
- Subject: [Bug bootstrap/20305] [4.0/4.1 Regression] Miscompilation of libcpp/macro.c at -O1 and higher
- References: <20050303191902.20305.jakub@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From jakub at gcc dot gnu dot org 2005-03-03 20:10 -------
There are two routines likely miscompiled in libcpp/macro.c:
replace_args and cpp_get_token (I removed all static keywords from the file,
then did a binary search on which routines cause this).
If all of macro.c but these 2 routines are compiled with gcc4 at -O2, but
these 2 routines at -O0, crtstuff.c is preprocessed and compiled just fine.
cpp_get_token is responsible for the error: syntax error before _restrict__
etc. errors, while if replace_args is compiled with -O2 it causes
/usr/include/link.h:54: error: syntax error before `int64_Addr'
/usr/include/link.h:64: error: syntax error before `r_ldbase'
/usr/include/link.h:77: error: syntax error before `_DYNAMIC'
/usr/include/link.h:90: internal compiler error: Bus error
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla> for instructions.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20305