1 // PR c++/40373 2 // { dg-do compile } 3 4 struct A; 5 namespace 6 { 7 struct A; 8 } 9 10 struct B {}; 11 12 template <typename T> void foo(T t)13foo (T t) 14 { 15 t.~A (); // { dg-error "does not match destructor name" } 16 } 17 18 void bar()19bar () 20 { 21 foo (B ()); // { dg-bogus "required from here" "" { xfail *-*-* } } 22 } 23