gcc/testsuite/g++.dg/lto/pr85655_0.C
raw| 1 | // { dg-lto-do link } |
| 2 | // { dg-require-effective-target shared } |
| 3 | // { dg-require-effective-target fpic } |
| 4 | // { dg-lto-options {{-O2 -fPIC -shared -flto}} } |
| 5 | |
| 6 | int a; |
| 7 | void b(...); |
| 8 | void c(int); |
| 9 | enum { d, e, f, g, h, i, j, k }; |
| 10 | class l { |
| 11 | public: |
| 12 | int ac; |
| 13 | bool m; |
| 14 | l(char *); |
| 15 | int n(); |
| 16 | }; |
| 17 | struct o { |
| 18 | int ad; |
| 19 | o(int p = 0) : ad(p) {} |
| 20 | }; |
| 21 | class C : public l { |
| 22 | public: |
| 23 | char q; |
| 24 | C(o) : l(&q) { m |= ac & a ?: 9; } |
| 25 | }; |
| 26 | class r : C { |
| 27 | public: |
| 28 | char s; |
| 29 | r(o p, char) : C(p) { |
| 30 | if (n()) { |
| 31 | b(a, s, ""); |
| 32 | c(5); |
| 33 | } |
| 34 | } |
| 35 | }; |
| 36 | class t : C { |
| 37 | public: |
| 38 | t(int) : C(d) {} |
| 39 | }; |
| 40 | r ag('b', 0), ah(o(), 0), ai(e, 0), aj(f, 0), ak(g, 0), al(h, 0), am(k, 0), |
| 41 | an(i, 0), ao(j, 0); |
| 42 | t ap(0); |