diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr50017.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/pr50017.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr50017.c b/gcc/testsuite/gcc.dg/pr50017.c new file mode 100644 index 00000000000..66bef007da1 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr50017.c @@ -0,0 +1,20 @@ +/* PR debug/50017 */ +/* { dg-do compile } */ +/* { dg-options "-O3 -fcompare-debug" } */ + +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; + } +} |