Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/lto/20080915_0.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 // { dg-lto-do assemble } |
131 | 2 |
111 | 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 { | |
131 | 20 Bar& operator*() { static Bar a; return a; } |
111 | 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 } |