aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/method.c
diff options
context:
space:
mode:
authorLee Millward <lee.millward@gmail.com>2006-07-18 17:22:39 +0000
committerLee Millward <lmillward@gcc.gnu.org>2006-07-18 17:22:39 +0000
commit492b73bda96d446cb62113559f1f705c1da365f3 (patch)
tree47341d836482d990d2715e53e3a1fe393fea0c52 /gcc/cp/method.c
parent1e76e76b47437c53cf1eea76519edfbfed84c950 (diff)
downloadgcc-492b73bda96d446cb62113559f1f705c1da365f3.zip
gcc-492b73bda96d446cb62113559f1f705c1da365f3.tar.gz
gcc-492b73bda96d446cb62113559f1f705c1da365f3.tar.bz2
re PR c++/28258 (ICE with invalid constructor)
PR c++/28258 * method.c (locate_copy): Check for non_reference returning error_mark_node. PR c++/28260 * decl.c (duplicate_decls): Return error_mark_node on ambiguous declaration. PR c++/28258 * g++/dg/other/error13.C: New test. PR c++/28260 * g++.dg/template/friend44.C: New test. From-SVN: r115561
Diffstat (limited to 'gcc/cp/method.c')
-rw-r--r--gcc/cp/method.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/cp/method.c b/gcc/cp/method.c
index 9029e85..312e3a9 100644
--- a/gcc/cp/method.c
+++ b/gcc/cp/method.c
@@ -946,6 +946,10 @@ locate_copy (tree type, void *client_)
if (!parms)
continue;
src_type = non_reference (TREE_VALUE (parms));
+
+ if (src_type == error_mark_node)
+ return NULL_TREE;
+
if (!same_type_ignoring_top_level_qualifiers_p (src_type, type))
continue;
if (!sufficient_parms_p (TREE_CHAIN (parms)))