Commit d708df29 by Jason Merrill Committed by Jason Merrill

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
parent febb1302
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
......
......@@ -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;
......
2011-06-23 Jason Merrill <jason@redhat.com>
PR c++/36435
* g++.dg/template/partial9.C: New.
2011-06-22 Hans-Peter Nilsson <hp@axis.com>
PR middle-end/49373
......
// PR c++/36435
template <class T> T f();
template <class T> T* f() { }
template int* f();
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