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

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

From-SVN: r159246
This commit is contained in:
Jason Merrill 2010-05-10 17:20:47 -04:00 committed by Jason Merrill
parent eaa9d009d8
commit 5a40306bb6
4 changed files with 18 additions and 2 deletions

View File

@ -1,5 +1,8 @@
2010-05-10 Jason Merrill <jason@redhat.com>
PR c++/44017
* semantics.c (baselink_for_fns): Revert earlier change.
PR c++/44045
* typeck.c (cp_build_modify_expr): Complain about assignment to
array from init list.

View File

@ -2658,8 +2658,7 @@ baselink_for_fns (tree fns)
if (!cl)
cl = DECL_CONTEXT (fn);
cl = TYPE_BINFO (cl);
return build_baselink (TYPE_BINFO (DECL_CONTEXT (fn)), cl, fns,
/*optype=*/NULL_TREE);
return build_baselink (cl, cl, fns, /*optype=*/NULL_TREE);
}
/* Returns true iff DECL is an automatic variable from a function outside

View File

@ -1,5 +1,8 @@
2010-05-10 Jason Merrill <jason@redhat.com>
PR c++/44017
* g++.dg/template/inherit5.C: New.
PR c++/44045
* g++.dg/cpp0x/initlist33.C: New.
* g++.dg/cpp0x/initlist26.C: Adjust.

View File

@ -0,0 +1,11 @@
struct A
{
template<int> void foo();
};
template<int N> struct B : A
{
B() { foo<N>(); }
};
B<0> b;