https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84044
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> --- (In reply to Martin Liška from comment #3) > Fixed on trunk by Richi's r256685. Is it intentional Richi that the revision > should fix such situations? Not really. It means that the following hunk removes too many TYPE_BINFOs I guess? @@ -5150,15 +5145,9 @@ free_lang_data_in_type (tree type) { free_lang_data_in_binfo (TYPE_BINFO (type)); /* We need to preserve link to bases and virtual table for all - polymorphic types to make devirtualization machinery working. - Debug output cares only about bases, but output also - virtual table pointers so merging of -fdevirtualize and - -fno-devirtualize units is easier. */ - if ((!BINFO_VTABLE (TYPE_BINFO (type)) - || !flag_devirtualize) - && ((!BINFO_N_BASE_BINFOS (TYPE_BINFO (type)) - && !BINFO_VTABLE (TYPE_BINFO (type))) - || debug_info_level != DINFO_LEVEL_NONE)) + polymorphic types to make devirtualization machinery working. */ + if (!BINFO_VTABLE (TYPE_BINFO (type)) + || !flag_devirtualize) TYPE_BINFO (type) = NULL; } } Or this change drops required information for the ODR warning. @@ -5186,6 +5175,11 @@ free_lang_data_in_type (tree type) while (ctx && TREE_CODE (ctx) == BLOCK); TYPE_CONTEXT (type) = ctx; } + + /* Drop TYPE_DECLs in TYPE_NAME in favor of the identifier in the + TYPE_DECL if the type doesn't have linkage. */ + if (! type_with_linkage_p (type)) + TYPE_NAME (type) = TYPE_IDENTIFIER (type); } Maybe you can "bisect" that. But I guess the warning is "correct" and -fno-semantic-interposition affects details in the vtable that lead to the warning. Honza?