1 /* Verify that sched re-inserts needed scopes properly. */ 2 /* { dg-do compile } */ 3 /* { dg-options "-mcpu=ev5" { target alpha*-*-* } } */ 4 5 template <class T> foo()6inline void foo() 7 { 8 void (T::*x)() __attribute__ ((__unused__)) = &T::bar; 9 } 10 11 template <class T> 12 struct D 13 { barD14 void bar() { 15 } 16 T i; 17 }; 18 19 template <class T> 20 struct E 21 { barE22 void bar() { 23 foo <D<T> > (); 24 *i-- = *i; 25 } 26 T i; 27 }; 28 29 struct A {}; 30 template<typename T> struct B { typedef typename T::t t; }; 31 template<typename T> struct B<T*> { typedef T& t; }; 32 template<typename T> 33 struct C 34 { 35 T b; 36 explicit C (const T& i) : b (i) { } 37 typename B<T>::t operator* () const { return *b; } 38 C operator-- (int) { return C (b--); } 39 }; 40 41 template void foo <E<C<A**> > > (); 42 template void foo <D<C<A**> > > (); 43