File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -6187,8 +6187,13 @@ init_emit_once (void)
61876187 /* Don't use gen_rtx_CONST_INT here since gen_rtx_CONST_INT in this case
61886188 tries to use these variables. */
61896189 for (i = - MAX_SAVED_CONST_INT; i <= MAX_SAVED_CONST_INT; i++)
6190- const_int_rtx[i + MAX_SAVED_CONST_INT] =
6191- gen_rtx_raw_CONST_INT (VOIDmode, (HOST_WIDE_INT) i);
6190+ {
6191+ // Do not initialize twice the constants because there are used elsewhere
6192+ // and libgccjit execute this function twice.
6193+ if (const_int_rtx[i + MAX_SAVED_CONST_INT] == NULL )
6194+ const_int_rtx[i + MAX_SAVED_CONST_INT] =
6195+ gen_rtx_raw_CONST_INT (VOIDmode, (HOST_WIDE_INT) i);
6196+ }
61926197
61936198 if (STORE_FLAG_VALUE >= - MAX_SAVED_CONST_INT
61946199 && STORE_FLAG_VALUE <= MAX_SAVED_CONST_INT)
You can’t perform that action at this time.
0 commit comments