view gcc/testsuite/gcc.dg/pr50017.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
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;
    }
}