2018-11-07 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / g++.dg / lto / pr86523-3_0.C
blob31063b8773a9c20909632b87faadb0eecd087c31
1 // { dg-lto-do link }
2 // { dg-require-effective-target fpic }
3 // { dg-require-effective-target shared }
4 // { dg-lto-options { { -fPIC -flto -g -shared } } }
5 class a {
6     int b;
7 };
8 int const c = 0, d = 1, f = 2, g = 3;
9 struct B {
10     typedef a h;
11     h i;
13 template <class> B j();
14 template <class> struct k_context { static B const e_missingvar; };
15 template <class l> B const k_context<l>::e_missingvar = j<l>();
16 inline B m() {
17     switch (0) {
18       case c:
19       case d:
20       return k_context<int>::e_missingvar;
21       case f:
22       case g:;
23     }