summaryrefslogtreecommitdiff
path: root/gcc/lto/lto-symtab.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2016-01-12 14:22:40 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2016-01-12 14:22:40 +0000
commit3c4e91c903a599641e3adf08b6f2646d778c4cf3 (patch)
tree9bbcc45e1a72bbd0e7e5d86383d3182fb807651d /gcc/lto/lto-symtab.c
parent8b1bbf9cd703b514c1deea15788a9904ec90679d (diff)
re PR debug/69077 (omnetpp ICEs with -flto -g)
2016-01-12 Richard Biener <rguenther@suse.de> PR lto/69077 lto/ * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Properly merge TREE_ADDRESSABLE and DECL_POSSIBLY_INLINED flags. * g++.dg/lto/pr69077_0.C: New testcase. * g++.dg/lto/pr69077_1.C: Likewise. From-SVN: r232272
Diffstat (limited to 'gcc/lto/lto-symtab.c')
-rw-r--r--gcc/lto/lto-symtab.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/lto/lto-symtab.c b/gcc/lto/lto-symtab.c
index 3936916d873..a6f6d01dda1 100644
--- a/gcc/lto/lto-symtab.c
+++ b/gcc/lto/lto-symtab.c
@@ -997,6 +997,18 @@ lto_symtab_prevailing_virtual_decl (tree decl)
n = n->next_sharing_asm_name;
if (n)
{
+ /* Merge decl state in both directions, we may still end up using
+ the other decl. */
+ TREE_ADDRESSABLE (n->decl) |= TREE_ADDRESSABLE (decl);
+ TREE_ADDRESSABLE (decl) |= TREE_ADDRESSABLE (n->decl);
+
+ if (TREE_CODE (decl) == FUNCTION_DECL)
+ {
+ /* Merge decl state in both directions, we may still end up using
+ the other decl. */
+ DECL_POSSIBLY_INLINED (n->decl) |= DECL_POSSIBLY_INLINED (decl);
+ DECL_POSSIBLY_INLINED (decl) |= DECL_POSSIBLY_INLINED (n->decl);
+ }
lto_symtab_prevail_decl (n->decl, decl);
decl = n->decl;
}