]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
PR lto/89272
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 10 Feb 2019 10:46:43 +0000 (10:46 +0000)
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 10 Feb 2019 10:46:43 +0000 (10:46 +0000)
* tree.c (fld_simplified_type_name): Also keep TYPE_DECL for
polymorphic types.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268742 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/tree.c

index 7b8c81e4d13d5dd6700c730c0904597723652775..1ddc32a24f524039d1615eb5a504ad56baf1a7fe 100644 (file)
@@ -1,3 +1,9 @@
+2019-02-09  Jan Hubicka  <hubicka@ucw.cz>
+
+       PR lto/89272
+       * tree.c (fld_simplified_type_name): Also keep TYPE_DECL for
+       polymorphic types.
+
 2019-02-10  Monk Chiang  <sh.chiang04@gmail.com>
 
        * config/nds32/nds32.md (trap): New pattern.
index 3e51a85744cc8b0b8ed06efe4376de00873e1c7f..b8be295d14520ddf04694e05308ecab8f940ea88 100644 (file)
@@ -5153,7 +5153,10 @@ fld_simplified_type_name (tree type)
      TYPE_DECL if the type doesn't have linkage.
      this must match fld_  */
   if (type != TYPE_MAIN_VARIANT (type)
-      || !DECL_ASSEMBLER_NAME_SET_P (TYPE_NAME (type)))
+      || (!DECL_ASSEMBLER_NAME_SET_P (TYPE_NAME (type))
+         && (TREE_CODE (type) != RECORD_TYPE
+             || !TYPE_BINFO (type)
+             || !BINFO_VTABLE (TYPE_BINFO (type)))))
     return DECL_NAME (TYPE_NAME (type));
   return TYPE_NAME (type);
 }