Bootstrapped & tested on x86_64-unknown-linux-gnu, applied to trunk.
Richard. 2019-08-12 Richard Biener <rguent...@suse.de> PR lto/91375 * tree.c (free_lang_data_in_type): Do not free TYPE_BINFO dependent on flag_devirtualize. Index: gcc/tree.c =================================================================== --- gcc/tree.c (revision 274308) +++ gcc/tree.c (working copy) @@ -5531,8 +5531,7 @@ free_lang_data_in_type (tree type, class 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. */ - if (!BINFO_VTABLE (TYPE_BINFO (type)) - || !flag_devirtualize) + if (!BINFO_VTABLE (TYPE_BINFO (type))) TYPE_BINFO (type) = NULL; } }