Commit 6be8258d by Manuel López-Ibáñez Committed by Paolo Carlini

re PR c++/57638 (warning container: 'integer_cst’ not supported by dump_type#<type error>)

/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
parent 4033c667
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> 2013-06-18 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/53211 PR c++/53211
......
...@@ -16961,7 +16961,7 @@ unify (tree tparms, tree targs, tree parm, tree arg, int strict, ...@@ -16961,7 +16961,7 @@ unify (tree tparms, tree targs, tree parm, tree arg, int strict,
later. */ later. */
return unify_success (explain_p); return unify_success (explain_p);
else 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 /* If ARG is a parameter pack or an expansion, we cannot unify
against it unless PARM is also a parameter pack. */ against it unless PARM is also a parameter pack. */
......
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> 2013-06-19 Sebastian Huber <sebastian.huber@embedded-brains.de>
PR target/55033 PR target/55033
......
// 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 }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment