diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.target/s390/pr20927.c')
-rw-r--r-- | gcc-4.9/gcc/testsuite/gcc.target/s390/pr20927.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/s390/pr20927.c b/gcc-4.9/gcc/testsuite/gcc.target/s390/pr20927.c new file mode 100644 index 000000000..dbc990f15 --- /dev/null +++ b/gcc-4.9/gcc/testsuite/gcc.target/s390/pr20927.c @@ -0,0 +1,23 @@ +/* This caused an ICE on s390x due to a reload inheritance bug. */ + +/* { dg-do compile } */ +/* { dg-options "-O2" } */ + +struct point { double x, y; }; +extern void use (struct point); + +void test (struct point *pc, struct point p1) +{ + struct point p0 = *pc; + + if (p0.x == p1.x && p0.y == p1.y) + use (p0); + + asm ("" : : : "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10"); + + p1.y -= p0.y; + + use (p0); + use (p1); +} + |