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: unassig...@gcc.gnu.org ReportedBy: mich...@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.