This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug debug/69077] [6 Regression] omnetpp ICEs with -flto -g
- From: "rguenther at suse dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 12 Jan 2016 09:14:25 +0000
- Subject: [Bug debug/69077] [6 Regression] omnetpp ICEs with -flto -g
- Auto-submitted: auto-generated
- References: <bug-69077-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69077
--- Comment #15 from rguenther at suse dot de <rguenther at suse dot de> ---
On Mon, 11 Jan 2016, hubicka at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69077
>
> --- Comment #14 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
> I suppose the problem here is that lto-symtab is not merging symtab nodes but
> only the FUNCTION_DECLs so the flag is not merged. Something like this may
> help.
> Index: lto-symtab.c
> ===================================================================
> --- lto-symtab.c (revision 232227)
> +++ lto-symtab.c (working copy)
> @@ -997,6 +1005,8 @@ lto_symtab_prevailing_virtual_decl (tree
> n = n->next_sharing_asm_name;
> if (n)
> {
> + 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;
> }
Works. Testing
Index: lto/lto-symtab.c
===================================================================
--- lto/lto-symtab.c (revision 232261)
+++ lto/lto-symtab.c (working copy)
@@ -997,6 +997,18 @@ lto_symtab_prevailing_virtual_decl (tree
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;
}