From b0dffed9dae9bd2d61292beb13038414270c03e5 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Mon, 12 Aug 2019 11:02:21 +0000 Subject: [PATCH] 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 PR lto/91375 * tree.c (free_lang_data_in_type): Do not free TYPE_BINFO dependent on flag_devirtualize. From-SVN: r274310 --- gcc/ChangeLog | 6 ++++++ gcc/tree.c | 3 +-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c59df62ed0f..9f767127a7d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-08-12 Richard Biener + + PR lto/91375 + * tree.c (free_lang_data_in_type): Do not free TYPE_BINFO dependent on + flag_devirtualize. + 2019-08-12 Richard Biener PR driver/91130 diff --git a/gcc/tree.c b/gcc/tree.c index 154ef3ac38f..8f80012c6e8 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -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; } } -- 2.30.2