From: Jan Hubicka Date: Fri, 26 Oct 2018 07:21:04 +0000 (+0200) Subject: * tree.c (free_lang_data_in_type): Only check main variants. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b322cdb21a83d2e7ef89058ee56e5a814f916617;p=gcc.git * tree.c (free_lang_data_in_type): Only check main variants. From-SVN: r265520 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 87e79471af8..6a2ba3aa7a5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,6 @@ 2018-10-26 Jan Hubicka + * tree.c (free_lang_data_in_type): Only check main variants. * ipa-devirt.c (warn_odr): Make static. (types_same_for_odr): Drop strict variant. (types_odr_comparable): Likewise. diff --git a/gcc/tree.c b/gcc/tree.c index f87bc373f56..593ef1ae293 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -5174,7 +5174,7 @@ free_lang_data_in_type (tree type) /* 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)) + if (type != TYPE_MAIN_VARIANT (type) || ! type_with_linkage_p (type)) { TYPE_NAME (type) = TYPE_IDENTIFIER (type); TYPE_STUB_DECL (type) = NULL;