2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.dg / debug / debug2.C
blobe0164202d13e47a68571c805043c0323b6900f9d
1 /* Verify that sched re-inserts needed scopes properly.  */
2 /* { dg-do compile } */
3 /* { dg-options "-mcpu=ev5" { target alpha*-*-* } } */
5 template <class T>
6 inline void foo()
8   void (T::*x)() __attribute__ ((__unused__)) = &T::bar;
11 template <class T>
12 struct D
14   void bar() {
15   }
16   T i;
19 template <class T>
20 struct E
22   void bar() {
23     foo <D<T> > ();
24     *i-- = *i;
25   }
26   T i;
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
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--); }
41 template void foo <E<C<A**> > > ();
42 template void foo <D<C<A**> > > ();