https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99126
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2021-02-17
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
CC| |marxin at gcc dot gnu.org
--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Thanks for the report.
> This is my understanding of what is going on here: we have a some
> generated code that in GIMPLE is proved to dereference a null pointer
> (BTW this code should be unreachable).
That's fine.
>
> MEM[(struct comp_Lisp_Cons *)0B].u.s.car = _35;
>
So I guess JIT should really initialize the builtins.
I tried manually calling:
gcc_jit_context_get_builtin_function (ctxt_0x8892590, "__builtin_trap");
and then your reproducer is fine.
Leaving to David.