aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/pr50017.c
blob: feeb4d445ee03ccf9b99ed7632faf5505c01326d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* 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;
    }
}