1 /* Test for diagnostics for duplicate member names in anonymous
2 structures and unions. PR 4784. */
3 /* { dg-do compile } */
4 /* { dg-options "" } */
11 int x
; /* { dg-error "duplicate member" } */
27 int b
; /* { dg-error "duplicate member" } */
43 int b
; /* { dg-error "duplicate member" } */
62 int x
; /* { dg-error "duplicate member" } */
78 int b
; /* { dg-error "duplicate member" } */
94 int b
; /* { dg-error "duplicate member" } */
108 #define D10(x) int x##0; int x##1; int x##2; int x##3; int x##4; int x##5; int x##6; int x##7; int x##8; int x##9;
109 #define D100(x) D10(x##0) D10(x##1) D10(x##2) D10(x##3) D10(x##4) D10(x##5) D10(x##6) D10(x##7) D10(x##8) D10(x##9)
111 #define S10(x) struct { D100(x##0) }; struct { D100(x##1) }; struct { D100(x##2) }; struct { D100(x##3) }; struct { D100(x##4) }; struct { D100(x##5) }; struct { D100(x##6) }; struct { D100(x##7) }; struct { D100(x##8) }; struct { D100(x##9) };
127 int a123
; /* { dg-error "duplicate member" } */