re PR lto/91375 (ICE on valid code in subbinfo_with_vtable_at_offset at ipa-devirt.c:2760 since r256685)

2019-08-12  Richard Biener  <rguenther@suse.de>

	PR lto/91375
	* tree.c (free_lang_data_in_type): Do not free TYPE_BINFO dependent on
	flag_devirtualize.

From-SVN: r274310
This commit is contained in:
Richard Biener 2019-08-12 11:02:21 +00:00 committed by Richard Biener
parent 8508ae1de0
commit b0dffed9da
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2019-08-12 Richard Biener <rguenther@suse.de>
PR lto/91375
* tree.c (free_lang_data_in_type): Do not free TYPE_BINFO dependent on
flag_devirtualize.
2019-08-12 Richard Biener <rguenther@suse.de>
PR driver/91130

View File

@ -5531,8 +5531,7 @@ free_lang_data_in_type (tree type, class free_lang_data_d *fld)
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;
}
}