https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70147
--- Comment #17 from Bernd Edlinger <bernd.edlinger at hotmail dot de> --- (In reply to Jakub Jelinek from comment #16) > Created attachment 37965 [details] > gcc6-pr70147-2.patch > this patch looks good to me. Thanks. > As the compromise I meant this instead (incremental patch). > Though, in that case the -flifetime-dse=2 clobbers are also wrong in the > subobject ctors, because they should not overlap the vtable pointers of the > virtual bases if we rely on them from the caller, otherwise when those are > inlined could be DSEd, even when we actually rely on them. However that sounds more or less like a P1-BUG ! If the virtual base has already initialized the base object, maybe it has put it into a linked list, or so all that code will silently be removed again, and the list would be left in an inconsistent state. Do you see a way, how to conditionalize the clobber on the in_charge? Bernd.