https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98229
Bug ID: 98229 Summary: ICE at -O1 in 32-bit mode on x86_64-pc-linux-gnu in decompose, at rtl.h:2282 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: zhendong.su at inf dot ethz.ch Target Milestone: --- [555] % gcctk -v Using built-in specs. COLLECT_GCC=gcctk COLLECT_LTO_WRAPPER=/local/suz-local/software/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/11.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../gcc-trunk/configure --disable-bootstrap --prefix=/local/suz-local/software/local/gcc-trunk --enable-languages=c,c++ --disable-werror --enable-multilib --with-system-zlib Thread model: posix Supported LTO compression algorithms: zlib gcc version 11.0.0 20201210 (experimental) [master revision b46dd03fe94:30c63a5c82a:afc14c8d0a9e7af13698a7eec84226a3cc4b0e67] (GCC) [556] % [556] % gcctk -m32 -O0 -c small.c [557] % [557] % gcctk -m32 -O1 -c small.c during RTL pass: expand small.c: In function âfâ: small.c:2:14: internal compiler error: in decompose, at rtl.h:2282 2 | void f() { a = a % ~0UL; } | ~~^~~~~~~~~~ 0x927acb wi::int_traits<std::pair<rtx_def*, machine_mode> >::decompose(long*, unsigned int, std::pair<rtx_def*, machine_mode> const&) ../../gcc-trunk/gcc/rtl.h:2280 0x927acb wide_int_ref_storage<false, false>::wide_int_ref_storage<std::pair<rtx_def*, machine_mode> >(std::pair<rtx_def*, machine_mode> const&) ../../gcc-trunk/gcc/wide-int.h:1025 0x927acb generic_wide_int<wide_int_ref_storage<false, false> >::generic_wide_int<std::pair<rtx_def*, machine_mode> >(std::pair<rtx_def*, machine_mode> const&) ../../gcc-trunk/gcc/wide-int.h:782 0x927acb wide_int_storage::wide_int_storage<std::pair<rtx_def*, machine_mode> >(std::pair<rtx_def*, machine_mode> const&) ../../gcc-trunk/gcc/wide-int.h:1115 0x927acb generic_wide_int<wide_int_storage>::generic_wide_int<std::pair<rtx_def*, machine_mode> >(std::pair<rtx_def*, machine_mode> const&) ../../gcc-trunk/gcc/wide-int.h:782 0x927acb expand_divmod(int, tree_code, machine_mode, rtx_def*, rtx_def*, rtx_def*, int, optab_methods) ../../gcc-trunk/gcc/expmed.c:4214 0xbec854 expand_doubleword_mod ../../gcc-trunk/gcc/optabs.c:1085 0xbecca1 expand_doubleword_divmod(machine_mode, rtx_def*, rtx_def*, rtx_def**, bool) ../../gcc-trunk/gcc/optabs.c:1159 0xbea858 expand_binop(machine_mode, optab_tag, rtx_def*, rtx_def*, rtx_def*, int, optab_methods) ../../gcc-trunk/gcc/optabs.c:2119 0xbedf03 sign_expand_binop(machine_mode, optab_tag, optab_tag, rtx_def*, rtx_def*, rtx_def*, int, optab_methods) ../../gcc-trunk/gcc/optabs.c:2282 0x928606 expand_divmod(int, tree_code, machine_mode, rtx_def*, rtx_def*, rtx_def*, int, optab_methods) ../../gcc-trunk/gcc/expmed.c:5216 0x938553 expand_expr_real_2(separate_ops*, rtx_def*, machine_mode, expand_modifier) ../../gcc-trunk/gcc/expr.c:9243 0x93f5e0 expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) ../../gcc-trunk/gcc/expr.c:10177 0x94b9d1 store_expr(tree_node*, rtx_def*, int, bool, bool) ../../gcc-trunk/gcc/expr.c:5859 0x94d84f expand_assignment(tree_node*, tree_node*, bool) ../../gcc-trunk/gcc/expr.c:5595 0x7f483a expand_gimple_stmt_1 ../../gcc-trunk/gcc/cfgexpand.c:3901 0x7f483a expand_gimple_stmt ../../gcc-trunk/gcc/cfgexpand.c:3999 0x7fc087 expand_gimple_basic_block ../../gcc-trunk/gcc/cfgexpand.c:6036 0x7fe9d6 execute ../../gcc-trunk/gcc/cfgexpand.c:6720 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. [558] % [558] % cat small.c unsigned long long a; void f() { a = a % ~0UL; }