Commit 05262294 by Jason Merrill Committed by Jason Merrill

re PR c++/52685 (ICE in copy_binfo)

	PR c++/52685
	* tree.c (copy_binfo): Handle BINFO_DEPENDENT_BASE_P.

From-SVN: r185968
parent 3cb04a53
2012-03-29 Jason Merrill <jason@redhat.com>
PR c++/52685
* tree.c (copy_binfo): Handle BINFO_DEPENDENT_BASE_P.
2012-03-29 Jakub Jelinek <jakub@redhat.com> 2012-03-29 Jakub Jelinek <jakub@redhat.com>
PR c++/52759 PR c++/52759
......
...@@ -1237,12 +1237,11 @@ copy_binfo (tree binfo, tree type, tree t, tree *igo_prev, int virt) ...@@ -1237,12 +1237,11 @@ copy_binfo (tree binfo, tree type, tree t, tree *igo_prev, int virt)
TREE_CHAIN (*igo_prev) = new_binfo; TREE_CHAIN (*igo_prev) = new_binfo;
*igo_prev = new_binfo; *igo_prev = new_binfo;
if (binfo) if (binfo && !BINFO_DEPENDENT_BASE_P (binfo))
{ {
int ix; int ix;
tree base_binfo; tree base_binfo;
gcc_assert (!BINFO_DEPENDENT_BASE_P (binfo));
gcc_assert (SAME_BINFO_TYPE_P (BINFO_TYPE (binfo), type)); gcc_assert (SAME_BINFO_TYPE_P (BINFO_TYPE (binfo), type));
BINFO_OFFSET (new_binfo) = BINFO_OFFSET (binfo); BINFO_OFFSET (new_binfo) = BINFO_OFFSET (binfo);
...@@ -1255,8 +1254,6 @@ copy_binfo (tree binfo, tree type, tree t, tree *igo_prev, int virt) ...@@ -1255,8 +1254,6 @@ copy_binfo (tree binfo, tree type, tree t, tree *igo_prev, int virt)
for (ix = 0; BINFO_BASE_ITERATE (binfo, ix, base_binfo); ix++) for (ix = 0; BINFO_BASE_ITERATE (binfo, ix, base_binfo); ix++)
{ {
tree new_base_binfo; tree new_base_binfo;
gcc_assert (!BINFO_DEPENDENT_BASE_P (base_binfo));
new_base_binfo = copy_binfo (base_binfo, BINFO_TYPE (base_binfo), new_base_binfo = copy_binfo (base_binfo, BINFO_TYPE (base_binfo),
t, igo_prev, t, igo_prev,
BINFO_VIRTUAL_P (base_binfo)); BINFO_VIRTUAL_P (base_binfo));
......
2012-03-29 Jason Merrill <jason@redhat.com>
PR c++/52685
* g++.dg/template/inherit8.C: New.
2012-03-29 Jakub Jelinek <jakub@redhat.com> 2012-03-29 Jakub Jelinek <jakub@redhat.com>
PR c++/52759 PR c++/52759
......
// PR c++/52685
template <typename T>
struct A
{
template <typename U>
struct B : public A <B<U> >
{
struct C : public B<U>
{
};
};
};
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