From b322cdb21a83d2e7ef89058ee56e5a814f916617 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Fri, 26 Oct 2018 09:21:04 +0200 Subject: [PATCH] * tree.c (free_lang_data_in_type): Only check main variants. From-SVN: r265520 --- gcc/ChangeLog | 1 + gcc/tree.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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; -- 2.30.2