From: hubicka Date: Sun, 10 Feb 2019 10:46:43 +0000 (+0000) Subject: PR lto/89272 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f38488941094a50728fe587d42640850cdb3d8eb;p=thirdparty%2Fgcc.git PR lto/89272 * 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7b8c81e4d13d..1ddc32a24f52 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-02-09 Jan Hubicka + + PR lto/89272 + * tree.c (fld_simplified_type_name): Also keep TYPE_DECL for + polymorphic types. + 2019-02-10 Monk Chiang * config/nds32/nds32.md (trap): New pattern. diff --git a/gcc/tree.c b/gcc/tree.c index 3e51a85744cc..b8be295d1452 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -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); }