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

            Bug ID: 66047
           Summary: [5/6 Regression] vlc compilation failure with target
                    attribute
           Product: gcc
           Version: 5.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jakub at gcc dot gnu.org
  Target Milestone: ---

__attribute__((target ("sse2"), noinline)) static void
foo (void)
{
  asm volatile ("" : : : "memory");
}

void
bar (void)
{
  foo ();
}

fails to compile with -O2 -m32 -mno-sse starting with r220520.  There is no
user error here, the bug is that the compiler chose to use sseregparm calling
convention when it isn't appropriate (not all callers support it).  Plus, in
this particular case there is no difference between sseregparm and normal
calling convention...

__attribute__((target ("sse2"), noinline)) static float
foo (float x, float y)
{
  return x + y;
}

float
bar (float x, float y)
{
  return foo (x + 1.0f, y) - 1.0f;
}

used to be wrong-code in between introduction of target attribute (supposedly
r138075 if we use -Dtarget=option for older releases) and r220519, now is
similarly rejects-valid.

Reply via email to