https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98585

            Bug ID: 98585
           Summary: [11 Regression] target attribute resets cmodel on x86
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: law at redhat dot com
                CC: hjl.tools at gmail dot com, jakub at redhat dot com
  Target Milestone: ---

Using the "target" attribute on x86 causes a reset of the cmodel from the
command line.

Compile this testcase with -mcmodel-large with gcc-10.  You will see that we
use movabsq to load the address of "bar" into a register and use an indirect
jump.  With gcc-11 we make a direct jump/call.  This causes grub2 to FTBFS in
Fedora rawhide and RHEL 9.

This appears to be caused by ba948b37768c99cd8eb9f5b6fbd45fcf4bd15b78

void bar (void);

void
__attribute__ ((target ("bmi2")))
foo()
{
  bar ();
}

Reply via email to