/* { dg-options "-std=c++11" } */ void gg(); static __typeof(gg) __gthrw_gg __attribute__((__weakref__("gg"))); template struct data { template data(Y& y,R(X::*f)(A...)); }; template data make_data(Y& y,R(X::*f)(A...)) { return data(y,f); } void global(data); struct test { void bar() {} void doit() { global(make_data(*this,&test::bar)); } };