From 6be8258d837c78d23026d1b1c57252ef790b8e3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20L=C3=B3pez-Ib=C3=A1=C3=B1ez?= <manu@gcc.gnu.org> Date: Wed, 19 Jun 2013 08:49:59 +0000 Subject: [PATCH] =?UTF-8?q?re=20PR=20c++/57638=20(warning=20container:=20'?= =?UTF-8?q?integer=5Fcst=E2=80=99=20not=20supported=20by=20dump=5Ftype#<ty?= =?UTF-8?q?pe=20error>)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit /cp 2013-06-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org> PR c++/57638 * pt.c (unify, [TEMPLATE_PARM_INDEX]): Pass to unify_type_mismatch TREE_TYPE (arg), not arg itself. /testsuite 2013-06-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org> PR c++/57638 * g++.dg/template/error53.C: New. From-SVN: r200192 --- gcc/cp/ChangeLog | 6 ++++++ gcc/cp/pt.c | 2 +- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/template/error53.C | 13 +++++++++++++ 4 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/g++.dg/template/error53.C diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 7e25e5253745..cc3fdde757b3 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2013-06-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org> + + PR c++/57638 + * pt.c (unify, [TEMPLATE_PARM_INDEX]): Pass to unify_type_mismatch + TREE_TYPE (arg), not arg itself. + 2013-06-18 Paolo Carlini <paolo.carlini@oracle.com> PR c++/53211 diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 25cbf3100cf1..517f05b3f421 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -16961,7 +16961,7 @@ unify (tree tparms, tree targs, tree parm, tree arg, int strict, later. */ return unify_success (explain_p); else - return unify_type_mismatch (explain_p, tparm, arg); + return unify_type_mismatch (explain_p, tparm, TREE_TYPE (arg)); /* If ARG is a parameter pack or an expansion, we cannot unify against it unless PARM is also a parameter pack. */ diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 73e1c625e473..1d7c2af7df2b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2013-06-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org> + + PR c++/57638 + * g++.dg/template/error53.C: New. + 2013-06-19 Sebastian Huber <sebastian.huber@embedded-brains.de> PR target/55033 diff --git a/gcc/testsuite/g++.dg/template/error53.C b/gcc/testsuite/g++.dg/template/error53.C new file mode 100644 index 000000000000..5976c868d6d4 --- /dev/null +++ b/gcc/testsuite/g++.dg/template/error53.C @@ -0,0 +1,13 @@ +// PR c++/57638 + +template<int x> +struct S {}; + +template<long long i> +void g(S<i>); + +void f() +{ + S<1000> t; + g(t); // { dg-error "no matching" } +} // { dg-message "mismatched types 'long long int' and 'int'" "" { target *-*-* } 12 } -- GitLab