C++: Internal compiler error 981117.
Martin v. Loewis
loewis@informatik.hu-berlin.de
Tue Mar 23 12:40:00 GMT 1999
> You're right. The bug is that we're assuming that we don't need to deal
> with that field if we have base classes. Removing the 'else' just above
> the assert should do the trick.
It does. Here is an updated patch.
1999-03-23 Martin von Löwis <loewis@informatik.hu-berlin.de>
* class.c (finish_struct_1): Always reset TYPE_FIELDS for empty
classes.
Index: class.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/class.c,v
retrieving revision 1.135
diff -c -p -r1.135 class.c
*** class.c 1999/03/09 23:02:30 1.135
--- class.c 1999/03/23 20:34:05
*************** finish_struct_1 (t, warn_anon)
*** 3986,3992 ****
if (n_baseclasses)
/* layout_basetypes will remove the base subobject fields. */
max_has_virtual = layout_basetypes (t, max_has_virtual);
! else if (empty)
TYPE_FIELDS (t) = fields;
my_friendly_assert (TYPE_FIELDS (t) == fields, 981117);
--- 3986,3992 ----
if (n_baseclasses)
/* layout_basetypes will remove the base subobject fields. */
max_has_virtual = layout_basetypes (t, max_has_virtual);
! if (empty)
TYPE_FIELDS (t) = fields;
my_friendly_assert (TYPE_FIELDS (t) == fields, 981117);
More information about the Gcc-patches
mailing list