[Bug c++/58105] New: wrong code generation for multiversioned functions

bernd.edlinger at hotmail dot de gcc-bugzilla@gcc.gnu.org
Thu Aug 8 16:13:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58105

            Bug ID: 58105
           Summary: wrong code generation for multiversioned functions
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: bernd.edlinger at hotmail dot de

the following test cases fail on i686-*:
g++.dg/ext/mv2.C
g++.dg/ext/mv5.C
g++.dg/ext/mv12.C

The code is OK on -O0, -O1, but fails on -O2 and -O3.

The problem seems to be that for multiversioned functions 
an internal dispatcher function is generated by
ix86_generate_version_dispatcher_body(), which is being inlined in -O2
and above.

But the inlined function does no longer call the target-specific function.
Instead the return value is the address of the target-specific function.



More information about the Gcc-bugs mailing list