From: hubicka Date: Wed, 24 Oct 2018 12:50:25 +0000 (+0000) Subject: * ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL; X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=56edcef395792bcef680a675ca73d6d8f02d1af6;p=thirdparty%2Fgcc.git * ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL; it is wrong for forward declarations. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@265460 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 300ab6cd4d2d..582d65a9c4a9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2018-10-11 Jan Hubicka + + * ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL; + it is wrong for forward declarations. + 2018-10-24 Ilya Leoshkevich * config/s390/s390.c (s390_check_qrst_address): Add the missing diff --git a/gcc/ipa-utils.h b/gcc/ipa-utils.h index 98f2a75cd814..7d663ec6b0ee 100644 --- a/gcc/ipa-utils.h +++ b/gcc/ipa-utils.h @@ -193,10 +193,10 @@ type_with_linkage_p (const_tree t) if (DECL_ASSEMBLER_NAME_SET_P (TYPE_NAME (t))) return true; - /* If free lang data was not run check if indeed the type looks like C++ - type with linkage. */ - if (in_lto_p || !TYPE_STUB_DECL (t)) + if (in_lto_p) return false; + /* We used to check for TYPE_STUB_DECL but that is set to NULL for forward + declarations. */ if (!RECORD_OR_UNION_TYPE_P (t) && TREE_CODE (t) != ENUMERAL_TYPE) return false;