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

            Bug ID: 124038
           Summary: [16 Regression] ICE: in convert_mult_to_fma, at
                    tree-ssa-math-opts.cc:3649 with -O2
                    --param=avoid-fma-max-bits=8 -march=rv64gv
           Product: gcc
           Version: 16.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 63633
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=63633&action=edit
reduced testcase

Compiler output:
$ riscv64-unknown-linux-gnu-gcc -O2 --param=avoid-fma-max-bits=8 -march=rv64gv
testcase.c
during GIMPLE pass: widening_mul
testcase.c: In function 'foo':
testcase.c:8:1: internal compiler error: in convert_mult_to_fma, at
tree-ssa-math-opts.cc:3649
    8 | foo(V v)
      | ^~~
0x369ed3d internal_error(char const*, ...)
        /repo/gcc-trunk/gcc/diagnostic-global-context.cc:787
0x114c3a1 fancy_abort(char const*, int, char const*)
        /repo/gcc-trunk/gcc/diagnostics/context.cc:1812
0xd4d509 convert_mult_to_fma
        /repo/gcc-trunk/gcc/tree-ssa-math-opts.cc:3649
0x1ba301e after_dom_children
        /repo/gcc-trunk/gcc/tree-ssa-math-opts.cc:6553
0x3400fe7 dom_walker::walk(basic_block_def*)
        /repo/gcc-trunk/gcc/domwalk.cc:354
0x1b8fb66 execute
        /repo/gcc-trunk/gcc/tree-ssa-math-opts.cc:6693
/repo/gcc-trunk/binary-trunk-20260209090647-r16-7405-g4e13b78bf0e281-checking-yes-rtl-df-extra-riscv64/bin/../libexec/gcc/riscv64-unknown-linux-gnu/16.0.1/cc1
-quiet -imultilib . -iprefix
/repo/gcc-trunk/binary-trunk-20260209090647-r16-7405-g4e13b78bf0e281-checking-yes-rtl-df-extra-riscv64/bin/../lib/gcc/riscv64-unknown-linux-gnu/16.0.1/
testcase.c -quiet -dumpdir a- -dumpbase testcase.c -dumpbase-ext .c
-march=rv64gv -mabi=lp64d -misa-spec=2.2 -mtls-dialect=trad
-march=rv64imafdv_zmmul_zaamo_zalrsc_zve32f_zve32x_zve64d_zve64f_zve64x_zvl128b_zvl32b_zvl64b
-O2 --param=avoid-fma-max-bits=8 -o /tmp/ccoqhpzi.s
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-20260209090647-r16-7405-g4e13b78bf0e281-checking-yes-rtl-df-extra-riscv64/bin/../libexec/gcc/riscv64-unknown-linux-gnu/16.0.1/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
--enable-libsanitizer --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
--disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-20260209090647-r16-7405-g4e13b78bf0e281-checking-yes-rtl-df-extra-riscv64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 16.0.1 20260209 (experimental) (GCC)

Reply via email to