aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gcc.dg/20000904-1.c11
2 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 202ad8f..5e423fd 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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
index 0000000..c6238e3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/20000904-1.c
@@ -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)));
+}