Commit 5a40306b by Jason Merrill Committed by Jason Merrill

re PR c++/44017 (ICE with template hierarchy)

	PR c++/44017
	* semantics.c (baselink_for_fns): Revert earlier change.

From-SVN: r159246
parent eaa9d009
2010-05-10 Jason Merrill <jason@redhat.com> 2010-05-10 Jason Merrill <jason@redhat.com>
PR c++/44017
* semantics.c (baselink_for_fns): Revert earlier change.
PR c++/44045 PR c++/44045
* typeck.c (cp_build_modify_expr): Complain about assignment to * typeck.c (cp_build_modify_expr): Complain about assignment to
array from init list. array from init list.
......
...@@ -2658,8 +2658,7 @@ baselink_for_fns (tree fns) ...@@ -2658,8 +2658,7 @@ baselink_for_fns (tree fns)
if (!cl) if (!cl)
cl = DECL_CONTEXT (fn); cl = DECL_CONTEXT (fn);
cl = TYPE_BINFO (cl); cl = TYPE_BINFO (cl);
return build_baselink (TYPE_BINFO (DECL_CONTEXT (fn)), cl, fns, return build_baselink (cl, cl, fns, /*optype=*/NULL_TREE);
/*optype=*/NULL_TREE);
} }
/* Returns true iff DECL is an automatic variable from a function outside /* Returns true iff DECL is an automatic variable from a function outside
......
2010-05-10 Jason Merrill <jason@redhat.com> 2010-05-10 Jason Merrill <jason@redhat.com>
PR c++/44017
* g++.dg/template/inherit5.C: New.
PR c++/44045 PR c++/44045
* g++.dg/cpp0x/initlist33.C: New. * g++.dg/cpp0x/initlist33.C: New.
* g++.dg/cpp0x/initlist26.C: Adjust. * g++.dg/cpp0x/initlist26.C: Adjust.
......
struct A
{
template<int> void foo();
};
template<int N> struct B : A
{
B() { foo<N>(); }
};
B<0> b;
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