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:
parent
7e1e0765bd
commit
af02935e3c
4 changed files with 14 additions and 0 deletions
|
@ -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.
|
||||
|
||||
|
|
|
@ -6745,6 +6745,7 @@ grokdeclarator (const cp_declarator *declarator,
|
|||
|
||||
type = TREE_OPERAND (decl, 0);
|
||||
name = IDENTIFIER_POINTER (constructor_name (type));
|
||||
dname = decl;
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
7
gcc/testsuite/g++.dg/other/virtual2.C
Normal file
7
gcc/testsuite/g++.dg/other/virtual2.C
Normal file
|
@ -0,0 +1,7 @@
|
|||
// PR c++/26071
|
||||
// { dg-do compile }
|
||||
|
||||
struct A
|
||||
{
|
||||
virtual static ~A(); // { dg-error "virtual" }
|
||||
};
|
Loading…
Add table
Reference in a new issue