re PR lto/66180 (many -Wodr false positives when building LLVM with -flto)
authorJan Hubicka <hubicka@ucw.cz>
Sun, 24 May 2015 19:38:14 +0000 (21:38 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Sun, 24 May 2015 19:38:14 +0000 (19:38 +0000)
commit233ce289250944dde071638799f9ba1a51a0a9bf
treefcafa16d16e0f29657b3cc4999c520546d0e89f1
parentbc0c7f396b0c9648365aee462e25107db00227e8
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
gcc/ChangeLog
gcc/cp/ChangeLog
gcc/cp/mangle.c
gcc/ipa-devirt.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/lto/pr66180_0.C [new file with mode: 0644]
gcc/testsuite/g++.dg/lto/pr66180_1.C [new file with mode: 0644]
gcc/tree.c