summaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2014-01-30 14:32:25 +0000
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2014-01-30 14:32:25 +0000
commitfcd591157cba8dfef51f66d6bf161a511060f1b2 (patch)
tree37407f85991be736888c610604b8114db6e88d69 /gcc/cp
parentaa005ede28ab74ce037e99ed7861e513d151bc0d (diff)
downloadgcc-fcd591157cba8dfef51f66d6bf161a511060f1b2.tar.gz
/cp
2014-01-30 Paolo Carlini <paolo.carlini@oracle.com> PR c++/58843 * typeck.c (lookup_destructor): Check dtor_type for error_mark_node. /testsuite 2014-01-30 Paolo Carlini <paolo.carlini@oracle.com> PR c++/58843 * g++.dg/lookup/crash8.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207305 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/typeck.c4
2 files changed, 9 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index ff696e3e884..f49e2e55c4b 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,10 @@
2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
+ PR c++/58843
+ * typeck.c (lookup_destructor): Check dtor_type for error_mark_node.
+
+2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
+
PR c++/58649
* pt.c (lookup_template_class_1): Check start_enum return value
for error_mark_node.
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c
index 6268f7bfbba..b6f47384f31 100644
--- a/gcc/cp/typeck.c
+++ b/gcc/cp/typeck.c
@@ -2486,6 +2486,10 @@ lookup_destructor (tree object, tree scope, tree dtor_name,
tree dtor_type = TREE_OPERAND (dtor_name, 0);
tree expr;
+ /* We've already complained about this destructor. */
+ if (dtor_type == error_mark_node)
+ return error_mark_node;
+
if (scope && !check_dtor_name (scope, dtor_type))
{
if (complain & tf_error)