This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/81702] [7/8 Regression] ICE in gimple_get_virt_method_for_vtable


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81702

--- Comment #8 from Nathan Sidwell <nathan at gcc dot gnu.org> ---
Ah, I remember now.  The ABI specifies the data layout of the various RTTI
objects like _ZTVN10__cxxabiv117__class_type_infoE.  It does not specify the
vtable layout -- implementations are free to add additional member functions:

(ABI doc) 2.9.4 The class definitions below are to be interpreted as implying a
memory layout following the class layout rules for the host ABI. They specify
data members only, except for the Standard-specified member functions of the
std::type_info class given below, and do not imply anything about the member
functions of these classes. Virtual member functions of these classes may only
be used within the target systems' respective runtime libraries. The data
members must be laid out exactly as specified. 

So the vtable is defined when the definition(s) of our implementations of those
structures is seen.

>From random user code, we generate the type info object and reference the
(undefined) vtable.

Ergo, I believe eliding the assert is the right thing.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]