https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105711
Bug ID: 105711 Summary: [12/13 Regression] ICE: in simplify_subreg, at simplify-rtx.cc:7346 with -O2 --param=sccvn-max-alias-queries-per-access=0 Product: gcc Version: 13.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: zsojka at seznam dot cz Target Milestone: --- Host: x86_64-pc-linux-gnu Created attachment 53027 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53027&action=edit reduced testcase Compiler output: $ x86_64-pc-linux-gnu-gcc -O2 --param=sccvn-max-alias-queries-per-access=0 testcase.c during RTL pass: expand testcase.c: In function 'foo': testcase.c:6:5: internal compiler error: in simplify_subreg, at simplify-rtx.cc:7346 6 | c /= 3040; | ~~^~~~~~~ 0x789ae6 simplify_context::simplify_subreg(machine_mode, rtx_def*, machine_mode, poly_int<1u, unsigned long>) /repo/gcc-trunk/gcc/simplify-rtx.cc:7346 0x138ff89 simplify_context::simplify_gen_subreg(machine_mode, rtx_def*, machine_mode, poly_int<1u, unsigned long>) /repo/gcc-trunk/gcc/simplify-rtx.cc:7624 0xfa0b6f simplify_gen_subreg(machine_mode, rtx_def*, machine_mode, poly_int<1u, unsigned long>) /repo/gcc-trunk/gcc/rtl.h:3534 0xfa0b6f extract_bit_field_as_subreg /repo/gcc-trunk/gcc/expmed.cc:1621 0xfa64ee extract_bit_field_1 /repo/gcc-trunk/gcc/expmed.cc:1829 0xfa77c7 extract_bit_field(rtx_def*, poly_int<1u, unsigned long>, poly_int<1u, unsigned long>, int, rtx_def*, machine_mode, machine_mode, bool, rtx_def**) /repo/gcc-trunk/gcc/expmed.cc:2137 0xfc58aa read_complex_part(rtx_def*, bool) /repo/gcc-trunk/gcc/expr.cc:3554 0xfd0c18 expand_assignment(tree_node*, tree_node*, bool) /repo/gcc-trunk/gcc/expr.cc:5586 0xe85887 expand_gimple_stmt_1 /repo/gcc-trunk/gcc/cfgexpand.cc:3935 0xe85887 expand_gimple_stmt /repo/gcc-trunk/gcc/cfgexpand.cc:4033 0xe8bb68 expand_gimple_basic_block /repo/gcc-trunk/gcc/cfgexpand.cc:6085 0xe8dd17 execute /repo/gcc-trunk/gcc/cfgexpand.cc:6811 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. $ x86_64-pc-linux-gnu-gcc -v Using built-in specs. COLLECT_GCC=/repo/gcc-trunk/binary-latest-amd64/bin/x86_64-pc-linux-gnu-gcc COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r13-723-20220524082011-g1adf11822bd-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/13.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++ --enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra --disable-bootstrap --with-cloog --with-ppl --with-isl --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu --with-ld=/usr/bin/x86_64-pc-linux-gnu-ld --with-as=/usr/bin/x86_64-pc-linux-gnu-as --disable-libstdcxx-pch --prefix=/repo/gcc-trunk//binary-trunk-r13-723-20220524082011-g1adf11822bd-checking-yes-rtl-df-extra-nobootstrap-amd64 Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 13.0.0 20220524 (experimental) (GCC)