aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/20030321-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/20030321-1.c')
-rw-r--r--gcc/testsuite/gcc.dg/20030321-1.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/20030321-1.c b/gcc/testsuite/gcc.dg/20030321-1.c
new file mode 100644
index 00000000000..228acec5471
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/20030321-1.c
@@ -0,0 +1,18 @@
+/* This used to ICE on s390 due to displacement overflow
+ when accessing the low-order subword. */
+
+/* { dg-do compile } */
+/* { dg-options "" } */
+
+struct array
+{
+ char align[4092];
+ long long elem[2] __attribute__ ((__packed__));
+};
+
+long long
+test (struct array *array, int i)
+{
+ return array->elem[i];
+}
+