aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2011-06-23 12:52:32 -0400
committerJason Merrill <jason@gcc.gnu.org>2011-06-23 12:52:32 -0400
commitd708df29c844a491bcb9ec44a839b0c9b0b2010f (patch)
tree62aa957ffeae7c874647d5934947f5e19ee1d610 /gcc/cp
parentfebb13025bec2b2a50c21e23e5b955cc31027c9d (diff)
downloadgcc-d708df29c844a491bcb9ec44a839b0c9b0b2010f.zip
gcc-d708df29c844a491bcb9ec44a839b0c9b0b2010f.tar.gz
gcc-d708df29c844a491bcb9ec44a839b0c9b0b2010f.tar.bz2
re PR c++/36435 (Partial ordering of explicit specialization should include return type)
PR c++/36435 * pt.c (most_specialized_instantiation): Do check return types. From-SVN: r175338
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/pt.c8
2 files changed, 9 insertions, 4 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 505de35..64a5807 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2011-06-23 Jason Merrill <jason@redhat.com>
+
+ PR c++/36435
+ * pt.c (most_specialized_instantiation): Do check return types.
+
2011-06-22 Jason Merrill <jason@redhat.com>
PR c++/49260
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 2716f78..08ce5af 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -16610,12 +16610,12 @@ most_specialized_instantiation (tree templates)
if (get_bindings (TREE_VALUE (champ),
DECL_TEMPLATE_RESULT (TREE_VALUE (fn)),
- NULL_TREE, /*check_ret=*/false))
+ NULL_TREE, /*check_ret=*/true))
fate--;
if (get_bindings (TREE_VALUE (fn),
DECL_TEMPLATE_RESULT (TREE_VALUE (champ)),
- NULL_TREE, /*check_ret=*/false))
+ NULL_TREE, /*check_ret=*/true))
fate++;
if (fate == -1)
@@ -16637,10 +16637,10 @@ most_specialized_instantiation (tree templates)
for (fn = templates; fn != champ; fn = TREE_CHAIN (fn))
if (get_bindings (TREE_VALUE (champ),
DECL_TEMPLATE_RESULT (TREE_VALUE (fn)),
- NULL_TREE, /*check_ret=*/false)
+ NULL_TREE, /*check_ret=*/true)
|| !get_bindings (TREE_VALUE (fn),
DECL_TEMPLATE_RESULT (TREE_VALUE (champ)),
- NULL_TREE, /*check_ret=*/false))
+ NULL_TREE, /*check_ret=*/true))
{
champ = NULL_TREE;
break;