summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
Diffstat (limited to 'clang')
-rw-r--r--clang/test/Sema/PR3675.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/clang/test/Sema/PR3675.c b/clang/test/Sema/PR3675.c
new file mode 100644
index 00000000000..9c86d8cbcf5
--- /dev/null
+++ b/clang/test/Sema/PR3675.c
@@ -0,0 +1,16 @@
+// RUN: clang -verify %s
+//
+// This example was reduced from actual code in Wine 1.1.13. GCC accepts this
+// code, while the correct behavior is to reject it.
+//
+
+typedef struct _IRP {
+ union {
+ struct {
+ union {} u; // expected-note{{previous declaration is here}}
+ struct {
+ union {} u; // expected-error{{error: member of anonymous struct redeclares 'u'}}
+ };
+ } Overlay;
+ } Tail;
+} IRP;
OpenPOWER on IntegriCloud