diff options
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/pt.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/cp/pt.cc b/gcc/cp/pt.cc index 9a21467b..b6a450c 100644 --- a/gcc/cp/pt.cc +++ b/gcc/cp/pt.cc @@ -24706,6 +24706,8 @@ unify (tree tparms, tree targs, tree parm, tree arg, int strict, /* Type INTEGER_CST can come from ordinary constant template args. */ case INTEGER_CST: case REAL_CST: + if (!same_type_p (TREE_TYPE (parm), TREE_TYPE (arg))) + return unify_template_argument_mismatch (explain_p, parm, arg); while (CONVERT_EXPR_P (arg)) arg = TREE_OPERAND (arg, 0); |