summaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gcc.dg/20000623-1.c17
2 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index b3ad82b1278..5b7babef7fb 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2000-06-23 Geoffrey Keating <geoffk@cygnus.com>
+
+ * gcc.dg/20000623-1.c: New test.
+
2000-06-22 Jakub Jelinek <jakub@redhat.com>
* gcc.c-torture/execute/20000622-1.c: New test.
diff --git a/gcc/testsuite/gcc.dg/20000623-1.c b/gcc/testsuite/gcc.dg/20000623-1.c
new file mode 100644
index 00000000000..0a5cd248f35
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/20000623-1.c
@@ -0,0 +1,17 @@
+/* { dg-do run } */
+/* { dg-options "-O3 -fno-strict-aliasing" } */
+
+struct foos { int l; };
+int foo;
+static struct foos *getfoo(void);
+int main (void)
+{
+ struct foos *f = getfoo();
+ f->l = 1;
+ foo = 2;
+ if (f->l == 1)
+ abort();
+ exit(0);
+}
+static struct foos *getfoo(void)
+{ return (struct foos *)&foo; }