view gcc/testsuite/gcc.dg/pr50017.c @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* PR debug/50017 */
/* { dg-do compile } */
/* { dg-options "-O3 -fcompare-debug" } */
/* { dg-xfail-if "" { powerpc-ibm-aix* } } */

struct S { int r, i; };

void
foo (struct S *x, int y)
{
  int i;
  for (i = 1; i < y; i++)
    {
      struct S a, b, c;
      a = x[0];
      b = x[i];
      c.r = a.r * b.r - a.i * b.i;
      c.i = a.r * b.i + a.i * b.r;
      x[i] = c;
    }
}