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

            Bug ID: 119713
           Summary: RISC-V: -march=rv64gcv gives an internal compiler
                    error in a_as
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: negge at dgql dot org
  Target Milestone: ---

Created attachment 61063
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=61063&action=edit
min.c

Building kmod-33 with gcc-15.0.1_pre20250406 gives an internal compiler error.
I have attached a reduced input file min.c. Note, it compiles with
-march=rv64gc.

# riscv64-unknown-linux-gnu-gcc --version
riscv64-unknown-linux-gnu-gcc (Gentoo 15.0.1_pre20250406 p53) 15.0.1 20250406
(experimental)
Copyright (C) 2025 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

# riscv64-unknown-linux-gnu-gcc -O3 -march=rv64gcv -pipe /tmp/min.c -c -o
/dev/null
during RTL pass: cse1
/tmp/min.c: In function ‘array_append_unique’:
/tmp/min.c:45:1: internal compiler error: in as_a, at machmode.h:391
   45 | }
      | ^
0xaaaac90bf153 diagnostic_context::diagnostic_impl(rich_location*,
diagnostic_metadata const*, diagnostic_option_id, char const*, std::__va_list*,
diagnostic_t)
        ???:0
0xaaaac90d6d7f internal_error(char const*, ...)
        ???:0
0xaaaac6ac4fe7 fancy_abort(char const*, int, char const*)
        ???:0
0xaaaac72819fb wi::to_poly_wide(rtx_def const*, machine_mode)
        ???:0
0xaaaac72ba5fb simplify_context::simplify_binary_operation_1(rtx_code,
machine_mode, rtx_def*, rtx_def*, rtx_def*, rtx_def*)
        ???:0
0xaaaac72be683 simplify_context::simplify_binary_operation(rtx_code,
machine_mode, rtx_def*, rtx_def*)
        ???:0
0xaaaac72c7c0f simplify_const_relational_operation(rtx_code, machine_mode,
rtx_def*, rtx_def*)
        ???:0
0xaaaac72c1daf simplify_context::simplify_relational_operation(rtx_code,
machine_mode, machine_mode, rtx_def*, rtx_def*)
        ???:0
0xaaaac72c0feb simplify_context::simplify_relational_operation_1(rtx_code,
machine_mode, machine_mode, rtx_def*, rtx_def*)
        ???:0
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://bugs.gentoo.org/> for instructions.

Reply via email to