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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|needs-bisection             |
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
double _Complex __attribute__((noipa))
foo (double _Complex acc, const double _Complex *x, const double _Complex* y,
int N)
{
  for (int c = 0; c < N; ++c)
    acc -= x[c] * y[c];
  return acc;
}

int
main()
{
  static const double _Complex y[] = { 1, 2, };
  static const double _Complex x[] = { 1, 3, };
  double _Complex ref = foo (0, x, y, 2);
  if (__builtin_creal (ref) != -7.)
    __builtin_abort ();
  return 0;
}

Started with r10-3252-g901083b9bdf69a7b1382f9682c6fd1d5759667dd
stopped with r11-1501-gda2b7c7f0a136b4d00520a08d4c443fc2e3a467d
The result it compiles when miscompiled is 7., so it is not just some ulp
difference in the computation.

Reply via email to