* 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 202ad8f48b9c7c48c948fbc8a14347a2558fdfa8..5e423fd3a16f352155a544c074a3cb3b4637d2f8 100644 (file)
@@ -1,3 +1,7 @@
+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.
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)));
+}