* gcc.dg/20000904-1.c: New test.
authorJakub Jelinek <jakub@redhat.com>
Mon, 4 Sep 2000 10:13:34 +0000 (12:13 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 4 Sep 2000 10:13:34 +0000 (12:13 +0200)
From-SVN: r36130

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/20000904-1.c [new file with mode: 0644]

index 202ad8f..5e423fd 100644 (file)
@@ -1,5 +1,9 @@
 2000-09-04  Jakub Jelinek  <jakub@redhat.com>
 
+       * gcc.dg/20000904-1.c: New test.
+
+2000-09-04  Jakub Jelinek  <jakub@redhat.com>
+
        * gcc.dg/cpp/paste8.c: New test.
 
 2000-09-01  Alexandre Oliva  <aoliva@redhat.com>
diff --git a/gcc/testsuite/gcc.dg/20000904-1.c b/gcc/testsuite/gcc.dg/20000904-1.c
new file mode 100644 (file)
index 0000000..c6238e3
--- /dev/null
@@ -0,0 +1,11 @@
+/* { dg-do compile { target i?86-*-* } } */
+/* { dg-options "-O0 -fpic" } */
+
+static struct {
+  unsigned short a, b, c, d;
+} x[10];
+
+int foo(int i)
+{
+  return ((*((char *)&x[i] + i)) | (*((char *)&x[i] + i)));
+}