This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/48326] New: Target attribute leaks from function pointers


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]