https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91027
--- Comment #8 from ibuclaw at gcc dot gnu.org --- (In reply to Jan Hubicka from comment #3) > Hi, > this patch triggers another confusion in ipa-devirt. > It tries to build type inheritnace graph but since D frotnend produces > only functions with DECL_VIRTUAL but no BINFOs and other things it > segfaults eventually. > > Working around it makes it to work. So this adds new question why D > frontend needs to set DECL_VIRTUAL? > BINFO to represent the class inheritance chain is generated by the D frontend, but nothing else is included. DECL_VIRTUAL_P is set on vtblZ global symbols, the __vptr field of class objects, and all virtual functions, as is documented in tree.h. There's the ability to bind to extern(C++) in the language (i.e: extern(C++) class CPPclass { }), so I think in general, the D front-end should be generating trees that have equivalence to the C++ front-end. If there's information missing, I think that should be included to not trip up LTO.