summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/s390/20041109-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.target/s390/20041109-1.c')
-rw-r--r--gcc/testsuite/gcc.target/s390/20041109-1.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/s390/20041109-1.c b/gcc/testsuite/gcc.target/s390/20041109-1.c
new file mode 100644
index 000000000..bf768439c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/s390/20041109-1.c
@@ -0,0 +1,21 @@
+/* This used to ICE due to a literal pool handling bug on s390x. */
+
+/* { dg-do compile } */
+/* { dg-options "-O2 -fno-omit-frame-pointer" } */
+
+static struct table { int x; } table[3];
+
+int test (void)
+{
+ struct table *t;
+
+ for (t = table; t < &table[3]; t++)
+ asm volatile ("" : : : "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "12");
+
+ for (t = table; t < &table[3]; t++)
+ if (t->x)
+ return 1;
+
+ return 0;
+}
+