gcc/testsuite/g++.dg/lto/20080915_0.C
raw| 1 | // { dg-lto-do assemble } |
| 2 | |
| 3 | struct Foo { |
| 4 | static const int dummy; |
| 5 | |
| 6 | int bit_field:1; |
| 7 | int dummy2:1; |
| 8 | int dummy3:1; |
| 9 | }; |
| 10 | |
| 11 | struct Bar { |
| 12 | Foo foo; |
| 13 | }; |
| 14 | |
| 15 | int func(const Bar& b) { |
| 16 | return b.foo.bit_field; |
| 17 | } |
| 18 | |
| 19 | struct Baz { |
| 20 | Bar& operator*() { static Bar a; return a; } |
| 21 | }; |
| 22 | |
| 23 | void func1(Baz baz, int i, Bar bar) { |
| 24 | i || func(bar); |
| 25 | *baz = bar; |
| 26 | } |
| 27 | |
| 28 | void func2(Baz baz, Bar bar) { |
| 29 | func1(baz, 0, bar); |
| 30 | } |