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

Krister Walfridsson <kristerw at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kristerw at gcc dot gnu.org

--- Comment #10 from Krister Walfridsson <kristerw at gcc dot gnu.org> ---
The function in the description is miscompiled on x86_64 with -O3
-march=x86-64-v2:

unsigned a, c;
int b, d;
signed char e;

void __attribute__((noipa))
f (void)
{ 
  for (; b; ++b)
    {
      c = 0;
      for (; c < 10; c++)
        {
          d = 0;
          for (; d < c; d++)
            a += e;
        }
    }
}

int
main ()
{
  b = -9;
  e = 1;
  f ();
  if (a != 405)
    __builtin_abort ();

  return 0;
}

Reply via email to