Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.jason/anon.C

raw
1 // { dg-do run }
2 // Bug: g++ has trouble copying anonymous structs.
3
4 typedef struct { int i; } foo;
5 struct A : public foo {
6 struct { int i; } x;
7 };
8
9 int main ()
10 {
11 A a;
12 a.i = 5;
13 a.x.i = 42;
14 A b (a);
15 a = b;
16 if (a.i != 5 || a.x.i != 42)
17 return 1;
18 return 0;
19 }