aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template/dtor7.C
blob: 186b561e9c3d8017be8d63e44406b12dc9d95430 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// PR c++/40373
// { dg-do compile }

struct A;
namespace
{
  struct A;
}

struct B {};

template <typename T> void
foo (T t)
{
  t.~A ();	// { dg-error "does not match destructor name" }
}

void
bar ()
{
  foo (B ());	// { dg-bogus "instantiated from here" "" { xfail *-*-* } }
}