2018-05-15 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / pr79983.c
blob84aae691318eefb95a72d6461c9aba272663eca5
1 /* PR c/79983 */
2 /* { dg-do compile } */
3 /* { dg-options "" } */
5 struct S;
6 struct S { int i; }; /* { dg-message "originally defined here" } */
7 struct S { int i, j; }; /* { dg-error "redefinition of 'struct S'" } */
9 enum E;
10 enum E { A, B, C }; /* { dg-message "originally defined here" } */
11 enum E { D, F }; /* { dg-error "nested redefinition of 'enum E'|redeclaration of 'enum E'" } */
13 union U;
14 union U { int i; }; /* { dg-message "originally defined here" } */
15 union U { int i; double d; }; /* { dg-error "redefinition of 'union U'" } */