2009-07-17 Richard Guenther <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / g++.dg / template / dtor7.C
blob0dac69e8948c31717f4cf5fbf9b3611397c333a1
1 // PR c++/40373
2 // { dg-compile }
4 struct A;       // { dg-bogus "candidates are" "" { xfail *-*-* } }
5 namespace
7   struct A;     // { dg-bogus "struct" "" { xfail *-*-* } }
10 struct B {};
12 template <typename T> void
13 foo (T t)
15   t.~A ();      // { dg-error "does not match destructor name" }
18 void
19 bar ()
21   foo (B ());   // { dg-bogus "instantiated from here" "" { xfail *-*-* } }
24 // { dg-bogus "is ambiguous" "" { xfail *-*-* } 15 }