]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* tree.c (free_lang_data_in_type): Only check main variants.
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 26 Oct 2018 07:21:04 +0000 (07:21 +0000)
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 26 Oct 2018 07:21:04 +0000 (07:21 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@265520 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/tree.c

index 87e79471af8e6c33b02d3fb62d749c53a6f72cf0..6a2ba3aa7a5a523eac04ab5059c660667eb7530b 100644 (file)
@@ -1,5 +1,6 @@
 2018-10-26  Jan Hubicka  <jh@suse.cz>
 
+       * 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.
index f87bc373f566224e8ff7a7619c8b9922a21588d2..593ef1ae293f0c73567a518ea5c5c76785cbd600 100644 (file)
@@ -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;