This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/48326] New: Target attribute leaks from function pointers
- From: "michael at talamasca dot ocis.net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 29 Mar 2011 05:57:47 +0000
- Subject: [Bug c/48326] New: Target attribute leaks from function pointers
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48326
Summary: Target attribute leaks from function pointers
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: c
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: michael@talamasca.ocis.net
Created attachment 23795
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23795
Raw preprocessed code demonstrating the bug.
In at least one case, a function -not- bearing a target attribute may be
compiled with illegal instructions for the current -m option, when it handles
pointers to functions that do have a permissive target attribute.
Attached is a demonstration case. When compiled on i386 with "-O1
-march=i386", a "cmovne" instruction is emitted.
One thing that makes this bug especially serious, is that my testcase is
distilled down from the function init_vectorized_lexer of "libcpp/lex.c" in GCC
itself. As a result, GCC 4.6.0 will fail to bootstrap on any processor that
does not support cmov-family instructions.