Merged r158704 through r158906 into branch.
[official-gcc.git] / gcc / testsuite / g++.dg / template / dtor7.C
blobe96f56397ebae0fc2a6069bf7825c347bab91cc7
1 // PR c++/40373
2 // { dg-compile }
4 struct A;
5 namespace
7   struct A;
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 *-*-* } }