In contrast with the other frontends, libgccjit can be executed multiple times in a row in the same process. This is the source of multiple bugs due to global variables as can be seen by several patches I sent these past years.
On Fri, 2023-11-17 at 14:06 -0700, Jeff Law wrote: > > > On 11/16/23 15:36, Antoni Boucher wrote: > > Hi. > > This patch fixes a RTL bug when using some target-specific builtins > > in > > libgccjit (bug 112576). > > > > The test use a function from an unmerged patch: > > https://gcc.gnu.org/pipermail/jit/2023q1/001605.html > > > > Thanks for the review! > The natural question here is why does libgccjit call init_emit_once > more > than one time? The whole point of that routine is doing one time > initializations. It's not supposed to be called more than once. > > David? Thoughts here? > > jeff