summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.brendan/warnings7.C
blob: 89d6ecaf586b4f98b52a01873b08b3a316780a50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// { dg-do assemble  }
// { dg-options "-O2 -Wall" }
// GROUPS passed warnings
template<class T>
class X {
public:
    void kill(unsigned i)
	{ vec[i].~T(); }
    T *vec;
};

class Y { };

void
x()
{
    X<int> x;
    x.kill(0);
    X<Y> y;
    y.kill(0);
}