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 @@ -6189,8 +6189,13 @@ init_emit_once (void)
6189
6189
/* Don't use gen_rtx_CONST_INT here since gen_rtx_CONST_INT in this case
6190
6190
tries to use these variables. */
6191
6191
for (i = - MAX_SAVED_CONST_INT; i <= MAX_SAVED_CONST_INT; i++)
6192
- const_int_rtx[i + MAX_SAVED_CONST_INT] =
6193
- gen_rtx_raw_CONST_INT (VOIDmode, (HOST_WIDE_INT) i);
6192
+ {
6193
+ // Do not initialize twice the constants because there are used elsewhere
6194
+ // and libgccjit execute this function twice.
6195
+ if (const_int_rtx[i + MAX_SAVED_CONST_INT] == NULL )
6196
+ const_int_rtx[i + MAX_SAVED_CONST_INT] =
6197
+ gen_rtx_raw_CONST_INT (VOIDmode, (HOST_WIDE_INT) i);
6198
+ }
6194
6199
6195
6200
if (STORE_FLAG_VALUE >= - MAX_SAVED_CONST_INT
6196
6201
&& STORE_FLAG_VALUE <= MAX_SAVED_CONST_INT)
You can’t perform that action at this time.
0 commit comments