From 4c0d3f7728752d436ca4c7b4d0ae6039c5cc7757 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Sun, 10 Feb 2019 11:46:43 +0100 Subject: [PATCH] re PR lto/89272 (r268728 caused FAIL: g++.dg/lto/pr65316 cp_lto_pr65316_0.o assemble) PR lto/89272 * tree.c (fld_simplified_type_name): Also keep TYPE_DECL for polymorphic types. From-SVN: r268742 --- gcc/ChangeLog | 6 ++++++ gcc/tree.c | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7b8c81e4d13..1ddc32a24f5 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 3e51a85744c..b8be295d145 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); } -- 2.30.2