Commit 05f9a806 by Marek Polacek Committed by Marek Polacek

re PR c++/85976 (ICE in cp_tree_equal when building Blitz. May be nested templates.)

	PR c++/85976
	* tree.c (cp_tree_equal): Handle USING_DECL.

	* g++.dg/cpp0x/alias-decl-64.C: New test.

From-SVN: r261200
parent 97a53d1d
2018-06-05 Marek Polacek <polacek@redhat.com>
PR c++/85976
* tree.c (cp_tree_equal): Handle USING_DECL.
2018-06-05 Jason Merrill <jason@redhat.com> 2018-06-05 Jason Merrill <jason@redhat.com>
PR c++/85731 - wrong error with qualified-id in template. PR c++/85731 - wrong error with qualified-id in template.
......
...@@ -3878,6 +3878,14 @@ cp_tree_equal (tree t1, tree t2) ...@@ -3878,6 +3878,14 @@ cp_tree_equal (tree t1, tree t2)
DEFERRED_NOEXCEPT_ARGS (t2))); DEFERRED_NOEXCEPT_ARGS (t2)));
break; break;
case USING_DECL:
if (DECL_DEPENDENT_P (t1) && DECL_DEPENDENT_P (t2))
return (cp_tree_equal (USING_DECL_SCOPE (t1),
USING_DECL_SCOPE (t2))
&& cp_tree_equal (DECL_NAME (t1),
DECL_NAME (t2)));
return false;
default: default:
break; break;
} }
......
2018-06-05 Marek Polacek <polacek@redhat.com>
PR c++/85976
* g++.dg/cpp0x/alias-decl-64.C: New test.
2018-06-05 Richard Biener <rguenther@suse.de> 2018-06-05 Richard Biener <rguenther@suse.de>
PR tree-optimization/86046 PR tree-optimization/86046
......
// PR c++/85976
// { dg-do compile { target c++11 } }
template <int> class A;
template <typename> class B;
template <typename> struct C;
template <typename P_expr> class D {
using B<typename P_expr::T_numtype>::rank_;
void operator()(typename C<A<rank_>>::i);
};
template <typename P_expr> class F {
using B<typename P_expr::T_numtype>::rank_;
void operator()(typename C<A<rank_>>::i);
};
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