From: Jan Hubicka Date: Wed, 24 Oct 2018 12:50:25 +0000 (+0200) Subject: ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL; it is wrong... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9a97772f93d68e8bc8b7166f3f7b202bfdc995f3;p=gcc.git ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL; it is wrong for forward declarations. * ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL; it is wrong for forward declarations. From-SVN: r265460 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 300ab6cd4d2..582d65a9c4a 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 98f2a75cd81..7d663ec6b0e 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;