https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122542
Bug ID: 122542
Summary: [16 Regression] RISC-V: internal compiler error:
Segmentation fault at diagnostic-global-context.cc:787
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: skothadiya at whileone dot in
Target Milestone: ---
Created attachment 62701
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=62701&action=edit
Testcase
Command/Backtrace
````
skothadiya/.../triage-ice/out-tmp-3-4872/testpad$
/home/skothadiya/CIFUZZR/riscv-gnu-toolchain-build/bin/riscv64-unknown-linux-gnu-gcc
-I/home/skothadiya/CIFUZZR/compiler-fuzz-ci/csmith-build/include -fsigned-char
-fno-strict-aliasing -fwrapv -O3 red.c -o rv64gcv.out -w -freport-bug
during GIMPLE pass: sccp
red.c: In function 'b':
red.c:2:6: internal compiler error: Segmentation fault
2 | void b(char c[][3][3][3][13][3]) {
| ^
0x3018b0b internal_error(char const*, ...)
/home/skothadiya/CIFUZZR/compiler-fuzz-ci/riscv-gnu-toolchain/gcc/gcc/diagnostic-global-context.cc:787
0x154c023 crash_signal
/home/skothadiya/CIFUZZR/compiler-fuzz-ci/riscv-gnu-toolchain/gcc/gcc/toplev.cc:323
0x71e02664532f ???
./signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0
0x164eea1 analyze_scalar_evolution_1
/home/skothadiya/CIFUZZR/compiler-fuzz-ci/riscv-gnu-toolchain/gcc/gcc/tree-scalar-evolution.cc:1989
0x164f8e5 analyze_scalar_evolution(loop*, tree_node*)
/home/skothadiya/CIFUZZR/compiler-fuzz-ci/riscv-gnu-toolchain/gcc/gcc/tree-scalar-evolution.cc:2081
0x165193a interpret_rhs_expr
/home/skothadiya/CIFUZZR/compiler-fuzz-ci/riscv-gnu-toolchain/gcc/gcc/tree-scalar-evolution.cc:1757
0x164f0c6 interpret_gimple_assign
/home/skothadiya/CIFUZZR/compiler-fuzz-ci/riscv-gnu-toolchain/gcc/gcc/tree-scalar-evolution.cc:1961
0x164f0c6 analyze_scalar_evolution_1
/home/skothadiya/CIFUZZR/compiler-fuzz-ci/riscv-gnu-toolchain/gcc/gcc/tree-scalar-evolution.cc:2012
0x164f9c2 analyze_scalar_evolution(loop*, tree_node*)
/home/skothadiya/CIFUZZR/compiler-fuzz-ci/riscv-gnu-toolchain/gcc/gcc/tree-scalar-evolution.cc:2081
0x170cd38 idx_infer_loop_bounds
/home/skothadiya/CIFUZZR/compiler-fuzz-ci/riscv-gnu-toolchain/gcc/gcc/tree-ssa-loop-niter.cc:4297
0x1720598 for_each_index(tree_node**, bool (*)(tree_node*, tree_node**, void*),
void*)
/home/skothadiya/CIFUZZR/compiler-fuzz-ci/riscv-gnu-toolchain/gcc/gcc/tree-ssa-loop.cc:576
0x170a00b infer_loop_bounds_from_ref
/home/skothadiya/CIFUZZR/compiler-fuzz-ci/riscv-gnu-toolchain/gcc/gcc/tree-ssa-loop-niter.cc:4378
0x170a00b infer_loop_bounds_from_array
/home/skothadiya/CIFUZZR/compiler-fuzz-ci/riscv-gnu-toolchain/gcc/gcc/tree-ssa-loop-niter.cc:4399
0x170a00b infer_loop_bounds_from_undefined
/home/skothadiya/CIFUZZR/compiler-fuzz-ci/riscv-gnu-toolchain/gcc/gcc/tree-ssa-loop-niter.cc:4558
0x170a00b estimate_numbers_of_iterations(loop*)
/home/skothadiya/CIFUZZR/compiler-fuzz-ci/riscv-gnu-toolchain/gcc/gcc/tree-ssa-loop-niter.cc:5023
0x170c1b9 loop_exits_before_overflow
/home/skothadiya/CIFUZZR/compiler-fuzz-ci/riscv-gnu-toolchain/gcc/gcc/tree-ssa-loop-niter.cc:5410
0x170c1b9 scev_probably_wraps_p(tree_node*, tree_node*, tree_node*, gimple*,
loop*, bool)
/home/skothadiya/CIFUZZR/compiler-fuzz-ci/riscv-gnu-toolchain/gcc/gcc/tree-ssa-loop-niter.cc:5662
0x195a9e7 get_scev_info
/home/skothadiya/CIFUZZR/compiler-fuzz-ci/riscv-gnu-toolchain/gcc/gcc/vr-values.cc:237
0x195a9e7 range_of_var_in_loop(vrange&, tree_node*, loop*, gimple*,
range_query*)
/home/skothadiya/CIFUZZR/compiler-fuzz-ci/riscv-gnu-toolchain/gcc/gcc/vr-values.cc:304
0x118b902 fold_using_range::range_of_ssa_name_with_loop_info(vrange&,
tree_node*, loop*, gphi*, fur_source&)
/home/skothadiya/CIFUZZR/compiler-fuzz-ci/riscv-gnu-toolchain/gcc/gcc/gimple-range-fold.cc:1278
Please submit a full bug report, with preprocessed source.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
Preprocessed source stored into /tmp/ccEFEPvB.out file, please attach this to
your bugreport.
````