| 1 |
// PR c++/82414 |
| 2 |
// { dg-lto-do link } |
| 3 |
enum vals {aa,cc}; // { dg-lto-warning "6: type 'vals' violates the C\\+\\+ One Definition Rule" } |
| 4 |
// { dg-lto-note "name 'cc' differs from name 'bb' defined in another translation unit" "" { target *-*-* } .-1 } |
| 5 |
struct a { // { dg-lto-warning "8: type 'struct a' violates the C\\+\\+ One Definition Rule" } |
| 6 |
struct b *ptr; // { dg-lto-note "13: the first difference of corresponding definitions is field 'ptr'" } |
| 7 |
// { dg-lto-note "the incompatible type defined in another translation unit" "" { target *-*-* } .-1 } |
| 8 |
enum vals vals; |
| 9 |
}; |
| 10 |
void test(struct a *a) |
| 11 |
{ |
| 12 |
a->vals = cc; |
| 13 |
} |