https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106548
Bug ID: 106548 Summary: ICE in #pragma openmp parallel for simd linear with long long variables Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: sandra at gcc dot gnu.org Target Milestone: --- Test case is reduced from libgomp.c/linear-1.c, with "simd" added to the loop: int a[256]; __attribute__((noinline, noclone)) long long int f3 (long long int i, long long int k) { #pragma omp parallel for simd linear (i: k) for (short j = 16; j < 64; j++) { a[i] = j; i += 4; } return i; } $ x86_64-linux-gnu-gcc -S -fopenmp linear-1.c during RTL pass: expand linear-1.c: In function 'f3._omp_fn.0': linear-1.c:6:11: internal compiler error: in expand_expr_real_1, at expr.cc:10721 6 | #pragma omp parallel for simd linear (i: k) | ^~~ 0x748517 expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) /path/to/gcc/expr.cc:10721 0xba694c expand_expr /path/to/gcc/expr.h:310 0xba694c expand_operands(tree_node*, tree_node*, rtx_def*, rtx_def**, rtx_def**, expand_modifier) /path/to/gcc/expr.cc:8403 0xb9eedb expand_expr_real_2(separate_ops*, rtx_def*, machine_mode, expand_modifier) /path/to/gcc/expr.cc:9631 0xa7a3c8 expand_gimple_stmt_1 /path/to/gcc/cfgexpand.cc:3983 0xa7a3c8 expand_gimple_stmt /path/to/gcc/cfgexpand.cc:4044 0xa8013e expand_gimple_basic_block /path/to/gcc/cfgexpand.cc:6096 0xa81c66 execute /path/to/cfgexpand.cc:6822 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. Declaring either i or k as plain "int" instead of "long long int" makes the crash go away.