OSDN Git Service

PR c++/15938
authorreichelt <reichelt@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 21 Jul 2005 14:50:46 +0000 (14:50 +0000)
committerreichelt <reichelt@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 21 Jul 2005 14:50:46 +0000 (14:50 +0000)
* g++.dg/init/union2.C: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@102235 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/init/union2.C [new file with mode: 0644]

index faf36f7..e7fb312 100644 (file)
@@ -1,5 +1,10 @@
 2005-07-21  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
 
+       PR c++/15938
+       * g++.dg/init/union2.C: New test.
+
+2005-07-21  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
+
        PR c/22393
        * gcc.dg/complex-4.c: New test.
 
diff --git a/gcc/testsuite/g++.dg/init/union2.C b/gcc/testsuite/g++.dg/init/union2.C
new file mode 100644 (file)
index 0000000..ac39f60
--- /dev/null
@@ -0,0 +1,13 @@
+// PR c++/15938
+// { dg-do compile }
+// { dg-options "" }
+
+typedef union
+{
+  struct { int i; };
+  struct { char c; };
+} A;
+
+A a = { 0 };
+A b = {{ 0 }};
+A c = {{{ 0 }}};  // { dg-error "braces" }