summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2009-06-24 16:25:52 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2009-06-24 16:25:52 +0000
commit7cfc046698405a194bc5be8e74f609da90c0977b (patch)
tree6f701bf90cca92cfb681650035c7b8df69c37d44 /gcc/testsuite/g++.dg
parentc86a70e3e6c75761e39dc24ee4820575dd804f1a (diff)
downloadgcc-7cfc046698405a194bc5be8e74f609da90c0977b.tar.gz
PR c++/40342
* decl.c (decls_match): Check DECL_TI_TEMPLATE too. * class.c (resolve_address_of_overloaded_function): Fix typo. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@148910 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/g++.dg')
-rw-r--r--gcc/testsuite/g++.dg/template/overload10.C6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/template/overload10.C b/gcc/testsuite/g++.dg/template/overload10.C
new file mode 100644
index 00000000000..088b9d291cb
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/overload10.C
@@ -0,0 +1,6 @@
+// PR c++40342
+
+template <typename T1, typename T2> int f(T1 *, const T2 *); // { dg-error "" }
+template <typename T1, typename T2> int f(const T1 *, T2 *); // { dg-error "" }
+
+int (*p)(const int *, const int *) = f; // { dg-error "ambiguous" }