aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2018-10-24 14:50:25 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2018-10-24 12:50:25 +0000
commit9a97772f93d68e8bc8b7166f3f7b202bfdc995f3 (patch)
tree6e8dffa096f84b379a2fe69628bbdc14211ad063
parent04193ea0e62120a273fbebf5bdb7e499fdf6e595 (diff)
downloadgcc-9a97772f93d68e8bc8b7166f3f7b202bfdc995f3.zip
gcc-9a97772f93d68e8bc8b7166f3f7b202bfdc995f3.tar.gz
gcc-9a97772f93d68e8bc8b7166f3f7b202bfdc995f3.tar.bz2
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
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/ipa-utils.h6
2 files changed, 8 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 300ab6c..582d65a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2018-10-11 Jan Hubicka <hubicka@ucw.cz>
+
+ * 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 <iii@linux.ibm.com>
* config/s390/s390.c (s390_check_qrst_address): Add the missing
diff --git a/gcc/ipa-utils.h b/gcc/ipa-utils.h
index 98f2a75..7d663ec 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;