Debian Codegraph @

gcc/testsuite/g++.dg/lto/pr87906_0.C

raw
1 // { dg-lto-do link }
2 // Explicit { dg-require-effective-target exceptions_enabled } so that dependent tests don't turn UNRESOLVED for '-fno-exceptions'.
3 // { dg-require-effective-target fpic }
4 // { dg-require-effective-target shared }
5 // { dg-lto-options { { -O -fPIC -flto } } }
6 // { dg-extra-ld-options "-shared -nostdlib" }
7
8 namespace com {
9 namespace moon {
10 namespace star {}
11 } // namespace moon
12 } // namespace com
13 namespace a = com::moon::star;
14 namespace com {
15 namespace moon {
16 namespace star {
17 namespace uno {
18 class a {
19 public:
20 ~a();
21 };
22
23 class b {
24 public:
25 ~b();
26 a c;
27 };
28 class c {
29 b e;
30 };
31 class RuntimeException : b {};
32 } // namespace uno
33 } // namespace star
34 } // namespace moon
35 } // namespace com
36 template <typename> void d(int) { throw a::uno::RuntimeException(); }
37 int f;
38 void g() { d<a::uno::b>(f); }