https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120154

            Bug ID: 120154
           Summary: [16 Regression] uring RTL pass: vect_permconst ICE: in
                    decompose, at rtl.h:2312 with -march=rv64gv
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zsojka at seznam dot cz
  Target Milestone: ---
              Host: x86_64-pc-linux-gnu
            Target: riscv64-unknown-linux-gnu

Created attachment 61352
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=61352&action=edit
reduced testcase

Compiler output:
$ riscv64-unknown-linux-gnu-gcc -O1 -march=rv64gv testcase.c 
during RTL pass: vect_permconst
testcase.c: In function 'foo':
testcase.c:16:1: internal compiler error: in decompose, at rtl.h:2312
   16 | }
      | ^
0x374aa81 internal_error(char const*, ...)
        /repo/gcc-trunk/gcc/diagnostic-global-context.cc:517
0x1135c6d fancy_abort(char const*, int, char const*)
        /repo/gcc-trunk/gcc/diagnostic.cc:1815
0x188075f wi::int_traits<std::pair<rtx_def*, machine_mode> >::decompose(long*,
unsigned int, std::pair<rtx_def*, machine_mode> const&)
        /repo/gcc-trunk/gcc/rtl.h:2312
0x188075f wide_int_ref_storage<false,
false>::wide_int_ref_storage<std::pair<rtx_def*, machine_mode>
>(std::pair<rtx_def*, machine_mode> const&)
        /repo/gcc-trunk/gcc/wide-int.h:1089
0x188075f 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&)
        /repo/gcc-trunk/gcc/wide-int.h:847
0x188075f poly_int<2u, generic_wide_int<wide_int_ref_storage<false, false> >
>::poly_int<std::pair<rtx_def*, machine_mode>>(poly_int_hungry,
std::pair<rtx_def*, machine_mode> const&)
        /repo/gcc-trunk/gcc/poly-int.h:464
0x188075f poly_int<2u, generic_wide_int<wide_int_ref_storage<false, false> >
>::poly_int<std::pair<rtx_def*, machine_mode> >(std::pair<rtx_def*,
machine_mode> const&)
        /repo/gcc-trunk/gcc/poly-int.h:457
0x188075f wi::to_poly_wide(rtx_def const*, machine_mode)
        /repo/gcc-trunk/gcc/rtl.h:2397
0x187fb8d rtx_vector_builder::step(rtx_def*, rtx_def*) const
        /repo/gcc-trunk/gcc/rtx-vector-builder.h:122
0x1880ae7 vector_builder<rtx_def*, machine_mode,
rtx_vector_builder>::stepped_sequence_p(unsigned int, unsigned int, unsigned
int)
        /repo/gcc-trunk/gcc/vector-builder.h:441
0x1880d0a vector_builder<rtx_def*, machine_mode,
rtx_vector_builder>::try_npatterns(unsigned int)
        /repo/gcc-trunk/gcc/vector-builder.h:494
0x1880f46 vector_builder<rtx_def*, machine_mode,
rtx_vector_builder>::finalize()
        /repo/gcc-trunk/gcc/vector-builder.h:582
0x188047e rtx_vector_builder::build(rtvec_def*)
        /repo/gcc-trunk/gcc/rtx-vector-builder.cc:33
0x142b62f gen_rtx_CONST_VECTOR(machine_mode, rtvec_def*)
        /repo/gcc-trunk/gcc/emit-rtl.cc:6224
0x1e3ede2 vector_permconst::process_bb(basic_block_def*)
        /repo/gcc-trunk/gcc/config/riscv/riscv-vect-permconst.cc:217
0x1e3f16a vector_permconst::execute(function*)
        /repo/gcc-trunk/gcc/config/riscv/riscv-vect-permconst.cc:291
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.

$ riscv64-unknown-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-riscv64/bin/riscv64-unknown-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-20250506192155-r16-433-g2c46a74d4707bd-checking-yes-rtl-df-extra-nobootstrap-nographite-riscv64/bin/../libexec/gcc/riscv64-unknown-linux-gnu/16.0.0/lto-wrapper
Target: riscv64-unknown-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 --without-cloog --without-ppl --without-isl
--with-isa-spec=2.2 --with-sysroot=/usr/riscv64-unknown-linux-gnu
--build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu
--target=riscv64-unknown-linux-gnu
--with-ld=/usr/bin/riscv64-unknown-linux-gnu-ld
--with-as=/usr/bin/riscv64-unknown-linux-gnu-as --disable-multilib
--enable-libsanitizer --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-20250506192155-r16-433-g2c46a74d4707bd-checking-yes-rtl-df-extra-nobootstrap-nographite-riscv64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 16.0.0 20250507 (experimental) (GCC)

Reply via email to