1 // { dg-do compile }
2 // { dg-require-effective-target lto }
3 // { dg-options "-flto" }
4 
5 void foo();
6 
7 static void bar() __attribute__((weakref("foo")));
8 
9 struct A
10 {
11     A();
12 };
13 
14 int i;
15 
16 template <typename T, int&> struct B : T {};
17 
18 B<A, i> b;
19