diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2015-05-24 21:38:14 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2015-05-24 19:38:14 +0000 |
commit | 233ce289250944dde071638799f9ba1a51a0a9bf (patch) | |
tree | fcafa16d16e0f29657b3cc4999c520546d0e89f1 /gcc/tree.c | |
parent | bc0c7f396b0c9648365aee462e25107db00227e8 (diff) | |
download | gcc-233ce289250944dde071638799f9ba1a51a0a9bf.zip gcc-233ce289250944dde071638799f9ba1a51a0a9bf.tar.gz gcc-233ce289250944dde071638799f9ba1a51a0a9bf.tar.bz2 |
re PR lto/66180 (many -Wodr false positives when building LLVM with -flto)
PR lto/66180
* ipa-devirt.c (type_with_linkage): Check that TYPE_STUB_DECL
is set; check for assembler name at LTO time.
(type_in_anonymous_namespace): Remove hacks, check that all
anonymous types are called "<anon>"
(odr_type_p): Simplify; add check for "<anon>"
(odr_subtypes_equivalent): Add odr_type_p check.
* tree.c (need_assembler_name_p): Even anonymous namespace needs
assembler name.
* mangle.c (mangle_decl): Mangle anonymous namespace types as
"<anon>".
* g++.dg/lto/pr66180_0.C: New testcase.
* g++.dg/lto/pr66180_1.C: New testcase.
From-SVN: r223633
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -5182,8 +5182,7 @@ need_assembler_name_p (tree decl) && DECL_NAME (decl) && decl == TYPE_NAME (TREE_TYPE (decl)) && !TYPE_ARTIFICIAL (TREE_TYPE (decl)) - && ((type_with_linkage_p (TREE_TYPE (decl)) - && !type_in_anonymous_namespace_p (TREE_TYPE (decl))) + && (type_with_linkage_p (TREE_TYPE (decl)) || TREE_CODE (TREE_TYPE (decl)) == INTEGER_TYPE) && !variably_modified_type_p (TREE_TYPE (decl), NULL_TREE)) return !DECL_ASSEMBLER_NAME_SET_P (decl); |