[Bug preprocessor/59782] New: libcpp does not avoid bug #48326 when compiled by older GCC
michael at talosis dot ca
gcc-bugzilla@gcc.gnu.org
Sun Jan 12 23:33:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59782
Bug ID: 59782
Summary: libcpp does not avoid bug #48326 when compiled by
older GCC
Product: gcc
Version: 4.8.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: preprocessor
Assignee: unassigned at gcc dot gnu.org
Reporter: michael at talosis dot ca
GCC 4.7.0 and other older versions have a bug (#48326) where the target
attribute can leak, causing illegal instructions to be emitted in code intended
to be generic.
GCC 4.6.0 through 4.8.2 also contain code that triggers this bug, in
libcpp/lex.c. That file uses the target attribute to opportunistically use
MMX/SSE even in a generic binary.
The result is that bootstrap is blocked if starting from 4.7.0 when the actual
CPU does not support the new instructions.
Currently the problem block of code is preprocessed in if GCC 4.5.0 or later is
detected. It should instead only be used for 4.7.1 or later.
Note that it is somewhat important to also fix this in 4.7.4. This bug only
bites when upgrading from an old GCC. If someone has an old GCC with C++ not
installed, then they cannot move directly to 4.8.x, and will have to build
4.7.x as an intermediate.
More information about the Gcc-bugs
mailing list