Skip to content

Commit

Permalink
Fix wrong reinitialization of target_builtins
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Apr 25, 2024
1 parent 426316e commit d8973d8
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions gcc/jit/dummy-frontend.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1035,8 +1035,6 @@ jit_end_diagnostic (diagnostic_context *context,
gcc::jit::active_playback_ctxt->add_diagnostic (context, *diagnostic);
}

static bool builtins_initialized = false;

/* Language hooks. */

static bool
Expand Down Expand Up @@ -1076,11 +1074,12 @@ jit_langhook_init (void)
mpfr_set_default_prec (256);

// TODO: check if this is a good fix.
if (!builtins_initialized)
{
targetm.init_builtins ();
builtins_initialized = true;
}
// static bool builtins_initialized = false;
// if (!builtins_initialized)
// {
// targetm.init_builtins ();
// builtins_initialized = true;
// }

return true;
}
Expand Down

0 comments on commit d8973d8

Please sign in to comment.