https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118587
--- Comment #6 from David Malcolm <dmalcolm at gcc dot gnu.org> --- Hi Basile. You're correct that this is a gap in the API, however the patch in comment #4 is incomplete. Have a look at: https://gcc.gnu.org/onlinedocs/jit/internals/index.html#submitting-patches for checklists of what's needed for a jit patch and for when adding a new API entrypoint.
