2
0
mirror of git://gcc.gnu.org/git/gcc.git synced 2025-04-13 16:41:19 +08:00

re PR c++/27447 (ICE on invalid ptr-to-member-function)

PR c++/27447
	* decl2.c (build_memfn_type): Skip invalid functions and class types.

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

From-SVN: r113615
This commit is contained in:
Volker Reichelt 2006-05-08 00:26:08 +00:00 committed by Volker Reichelt
parent abf5fd2fab
commit 15218346be
4 changed files with 17 additions and 0 deletions
gcc
cp
testsuite
ChangeLog
g++.dg/other

@ -1,3 +1,8 @@
2006-05-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/27447
* decl2.c (build_memfn_type): Skip invalid functions and class types.
2006-05-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/27427

@ -114,6 +114,9 @@ build_memfn_type (tree fntype, tree ctype, cp_cv_quals quals)
tree raises;
int type_quals;
if (fntype == error_mark_node || ctype == error_mark_node)
return error_mark_node;
type_quals = quals & ~TYPE_QUAL_RESTRICT;
ctype = cp_build_qualified_type (ctype, type_quals);
fntype = build_method_type_directly (ctype, TREE_TYPE (fntype),

@ -1,3 +1,8 @@
2006-05-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/27447
* g++.dg/other/ptrmem7.C: New test.
2006-05-07 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR target/27421

@ -0,0 +1,4 @@
// PR c++/27447
// { dg-do compile }
void (A::* p)(); // { dg-error "declared|token" }