re PR c++/8372 (ICE on explicit call of destructor)
PR c++/8372 * pt.c (tsubst_copy): Handle destructor names more correctly. PR c++/8372 * g++.dg/template/dtor1.C: New test. From-SVN: r60015
This commit is contained in:
parent
3932057ce9
commit
d23faea18e
4 changed files with 21 additions and 3 deletions
|
@ -1,4 +1,10 @@
|
|||
2002-12-10 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
PR c++/8372
|
||||
* pt.c (tsubst_copy): Handle destructor names more correctly.
|
||||
|
||||
2002-12-10 Matt Austern <austern@apple.com>
|
||||
|
||||
* cp-tree.h: get rid of needs_virtual_reinit bit.
|
||||
|
||||
2002-12-09 Mark Mitchell <mark@codesourcery.com>
|
||||
|
|
|
@ -7233,9 +7233,10 @@ tsubst_copy (t, args, complain, in_decl)
|
|||
{
|
||||
tree base = tsubst_copy (TREE_OPERAND (name, 0), args,
|
||||
complain, in_decl);
|
||||
name = TREE_OPERAND (name, 1);
|
||||
name = tsubst_copy (TREE_OPERAND (name, 0), args,
|
||||
complain, in_decl);
|
||||
name = TREE_OPERAND (TREE_OPERAND (name, 1), 0);
|
||||
if (TREE_CODE (name) == TYPE_DECL)
|
||||
name = TREE_TYPE (name);
|
||||
name = tsubst_copy (name, args, complain, in_decl);
|
||||
name = build1 (BIT_NOT_EXPR, NULL_TREE, name);
|
||||
name = build_nt (SCOPE_REF, base, name);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
2002-12-10 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
PR c++/8372
|
||||
* g++.dg/template/dtor1.C: New test.
|
||||
|
||||
* g++.old-deja/g++.ext/memconst.C: Use old-deja, not dg, error
|
||||
markers.
|
||||
|
||||
|
|
8
gcc/testsuite/g++.dg/template/dtor1.C
Normal file
8
gcc/testsuite/g++.dg/template/dtor1.C
Normal file
|
@ -0,0 +1,8 @@
|
|||
struct A {};
|
||||
|
||||
template <typename T> struct B
|
||||
{
|
||||
B() { A().A::~A(); }
|
||||
};
|
||||
|
||||
B<void> b;
|
Loading…
Add table
Reference in a new issue