| 1 |
// { dg-lto-do link } |
| 2 |
// { dg-lto-options { "-O2 -rdynamic -Wno-return-type" } } |
| 3 |
// { dg-extra-ld-options "-r -nostdlib" } |
| 4 |
// { dg-require-effective-target rdynamic } |
| 5 |
|
| 6 |
#pragma GCC visibility push(hidden) |
| 7 |
struct A { int &operator[] (long); }; |
| 8 |
template <typename> struct B; |
| 9 |
template <typename T, typename = B<T> > |
| 10 |
using Z = int; |
| 11 |
template <typename> struct C; |
| 12 |
struct S { |
| 13 |
int e; |
| 14 |
virtual ~S () {} |
| 15 |
}; |
| 16 |
struct D : S { |
| 17 |
A a; |
| 18 |
long i; |
| 19 |
D() { { e ? &a[i] : nullptr; } } |
| 20 |
}; |
| 21 |
template <> |
| 22 |
struct C<int> { Z<S> m8 () const; }; |
| 23 |
Z<S> |
| 24 |
C<int>::m8 () const |
| 25 |
{ |
| 26 |
D (); |
| 27 |
} |
| 28 |
|