re PR c/39084 (ice on struct redefinition)
authorSteve Ellcey <sje@cup.hp.com>
Tue, 10 Feb 2009 16:34:30 +0000 (16:34 +0000)
committerSteve Ellcey <sje@gcc.gnu.org>
Tue, 10 Feb 2009 16:34:30 +0000 (16:34 +0000)
PR c/39084
gcc.dg/pr39084.c: New test.

From-SVN: r144068

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr39084.c [new file with mode: 0644]

index e5d166e..37654e7 100644 (file)
@@ -1,3 +1,8 @@
+2009-02-10  Steve Ellcey  <sje@cup.hp.com>
+
+       PR c/39084
+       gcc.dg/pr39084.c: New test.
+
 2009-02-10  Jakub Jelinek  <jakub@redhat.com>
 
        PR target/39139
diff --git a/gcc/testsuite/gcc.dg/pr39084.c b/gcc/testsuite/gcc.dg/pr39084.c
new file mode 100644 (file)
index 0000000..6432841
--- /dev/null
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+struct color { int i; };
+static const struct color col;
+struct color * f(void)
+{
+    return (struct color *) &col;
+}
+
+struct color { int j; }; /* { dg-error "redefinition of" } */