From: hubicka Date: Fri, 26 Oct 2018 07:21:04 +0000 (+0000) Subject: * tree.c (free_lang_data_in_type): Only check main variants. X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6e2fb4b03d3cd0395c5624b2176e109f9bfc3168;p=thirdparty%2Fgcc.git * tree.c (free_lang_data_in_type): Only check main variants. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@265520 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 87e79471af8e..6a2ba3aa7a5a 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 f87bc373f566..593ef1ae293f 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;