summaryrefslogtreecommitdiff
path: root/gcc/cp/pt.c
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2012-12-06 14:36:55 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2012-12-06 14:36:55 +0000
commit10653583054e14543384a2ea432dac52ee40c337 (patch)
tree97e761a9c4c402a66ef11fbffd1bd5d2b18e85ab /gcc/cp/pt.c
parent5352fc9be132f34d87e2bc3d057c9fb57b2a350e (diff)
downloadgcc-10653583054e14543384a2ea432dac52ee40c337.tar.gz
PR c++/55564
* pt.c (unify) [ARRAY_TYPE]: Unify the element type before the bounds. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194248 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r--gcc/cp/pt.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index e349be6c4ab..27084a23598 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -16593,6 +16593,8 @@ unify (tree tparms, tree targs, tree parm, tree arg, int strict,
if ((TYPE_DOMAIN (parm) == NULL_TREE)
!= (TYPE_DOMAIN (arg) == NULL_TREE))
return unify_type_mismatch (explain_p, parm, arg);
+ RECUR_AND_CHECK_FAILURE (tparms, targs, TREE_TYPE (parm), TREE_TYPE (arg),
+ strict & UNIFY_ALLOW_MORE_CV_QUAL, explain_p);
if (TYPE_DOMAIN (parm) != NULL_TREE)
{
tree parm_max;
@@ -16651,8 +16653,7 @@ unify (tree tparms, tree targs, tree parm, tree arg, int strict,
RECUR_AND_CHECK_FAILURE (tparms, targs, parm_max, arg_max,
UNIFY_ALLOW_INTEGER, explain_p);
}
- return unify (tparms, targs, TREE_TYPE (parm), TREE_TYPE (arg),
- strict & UNIFY_ALLOW_MORE_CV_QUAL, explain_p);
+ return unify_success (explain_p);
case REAL_TYPE:
case COMPLEX_TYPE: