summaryrefslogtreecommitdiff
path: root/gcc/cp/method.c
diff options
context:
space:
mode:
authorlmillward <lmillward@138bc75d-0d04-0410-961f-82ee72b054a4>2006-07-18 17:22:39 +0000
committerlmillward <lmillward@138bc75d-0d04-0410-961f-82ee72b054a4>2006-07-18 17:22:39 +0000
commit5234121228691c11d68513df94043b3fd9e27107 (patch)
tree47341d836482d990d2715e53e3a1fe393fea0c52 /gcc/cp/method.c
parenta88e3b1432a6560269207415760f1997bc067861 (diff)
downloadgcc-5234121228691c11d68513df94043b3fd9e27107.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@115561 138bc75d-0d04-0410-961f-82ee72b054a4
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 9029e85a653..312e3a9c04a 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)))