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)
6187
6187
/* Don't use gen_rtx_CONST_INT here since gen_rtx_CONST_INT in this case
6188
6188
tries to use these variables. */
6189
6189
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
+ }
6192
6197
6193
6198
if (STORE_FLAG_VALUE >= - MAX_SAVED_CONST_INT
6194
6199
&& STORE_FLAG_VALUE <= MAX_SAVED_CONST_INT)
You can’t perform that action at this time.
0 commit comments