OSDN Git Service

* gcc.dg/20000904-1.c: New test.
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 4 Sep 2000 10:13:34 +0000 (10:13 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 4 Sep 2000 10:13:34 +0000 (10:13 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36130 138bc75d-0d04-0410-961f-82ee72b054a4

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)));
+}