[Bug go/91763] [10 regression] go.go-torture/execute/printnil.go FAILs

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Sep 18 07:12:00 GMT 2019


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91763

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Ian Lance Taylor from comment #2)
> I see now the fact that we are using exceptions is already being passed. 
> The problem seems to be that flag_exceptions is set when we read an
> exception region from an input function, by lto_init_eh.  But before we read
> any of the input functions, lto_main has already called symtab->compile
> which has called (*debug_hooks->assembly_start) which has checked
> flag_exceptions when deciding whether to emit a .cfi_sections directive.  So
> although flag_exceptions does get set, it gets set too late to fix this
> problem.

Hmm.  I guess we need to stream this as part of the callgraph instead.
And actually we do, gathering first_personality_decl, so we could conveniently
init EH there as well?

Index: gcc/lto/lto.c
===================================================================
--- gcc/lto/lto.c       (revision 275798)
+++ gcc/lto/lto.c       (working copy)
@@ -106,7 +106,10 @@ lto_materialize_function (struct cgraph_
       if (node->clone_of)
        return;
       if (DECL_FUNCTION_PERSONALITY (decl) && !first_personality_decl)
-       first_personality_decl = DECL_FUNCTION_PERSONALITY (decl);
+       {
+         first_personality_decl = DECL_FUNCTION_PERSONALITY (decl);
+         lto_init_eh ();
+       }
     }

   /* Let the middle end know about the function.  */


More information about the Gcc-bugs mailing list