summaryrefslogtreecommitdiff
path: root/gcc/cp/decl.c
diff options
context:
space:
mode:
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2010-09-15 09:06:32 +0000
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2010-09-15 09:06:32 +0000
commit23034a92ae4e80ff4186e581172a6351b0de6434 (patch)
tree42c7eaaecea214d2ce95be1f7d1c1b6d4c01ef5b /gcc/cp/decl.c
parente1f9b4f83124884dc0c0972f06bdc579f7986992 (diff)
downloadgcc-23034a92ae4e80ff4186e581172a6351b0de6434.tar.gz
/cp
2010-09-15 Paolo Carlini <paolo.carlini@oracle.com> PR c++/45665 * decl.c (grokdeclarator): Check build_memfn_type return value for error_mark_node. /testsuite 2010-09-15 Paolo Carlini <paolo.carlini@oracle.com> PR c++/45665 * g++.dg/template/crash103.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164299 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r--gcc/cp/decl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 8ca69da2866..3d1420a23eb 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -8762,6 +8762,8 @@ grokdeclarator (const cp_declarator *declarator,
type = build_memfn_type (type,
declarator->u.pointer.class_type,
memfn_quals);
+ if (type == error_mark_node)
+ return error_mark_node;
memfn_quals = TYPE_UNQUALIFIED;
}