aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorManuel López-Ibáñez <manu@gcc.gnu.org>2013-06-19 08:49:59 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2013-06-19 08:49:59 +0000
commit6be8258d837c78d23026d1b1c57252ef790b8e3d (patch)
tree1e92193013b0d484ff0c6d05b939e7aab31c5bfa /gcc
parent4033c667ceb55bb5d68f28ed35b3dde480b8b491 (diff)
downloadgcc-6be8258d837c78d23026d1b1c57252ef790b8e3d.zip
gcc-6be8258d837c78d23026d1b1c57252ef790b8e3d.tar.gz
gcc-6be8258d837c78d23026d1b1c57252ef790b8e3d.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/pt.c2
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.dg/template/error53.C13
4 files changed, 25 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 7e25e52..cc3fdde 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 25cbf31..517f05b 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 73e1c62..1d7c2af 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 0000000..5976c86
--- /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 }