re PR c++/26071 (ICE declaring destructor virtual and static)

PR c++/26071
	* decl.c (grokdeclarator): Set dname also for destructor.

	* g++.dg/other/virtual2.C: New test.

From-SVN: r110751
This commit is contained in:
Volker Reichelt 2006-02-08 11:21:27 +00:00 committed by Volker Reichelt
parent 7e1e0765bd
commit af02935e3c
4 changed files with 14 additions and 0 deletions

View file

@ -1,5 +1,8 @@
2006-02-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/26071
* decl.c (grokdeclarator): Set dname also for destructor.
PR c++/26070
* decl.c (grokdeclarator): Clear storage_class together with staticp.

View file

@ -6745,6 +6745,7 @@ grokdeclarator (const cp_declarator *declarator,
type = TREE_OPERAND (decl, 0);
name = IDENTIFIER_POINTER (constructor_name (type));
dname = decl;
}
break;

View file

@ -1,5 +1,8 @@
2006-02-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/26071
* g++.dg/other/virtual2.C: New test.
PR c++/26070
* g++.dg/other/virtual1.C: New test.

View file

@ -0,0 +1,7 @@
// PR c++/26071
// { dg-do compile }
struct A
{
virtual static ~A(); // { dg-error "virtual" }
};