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

            Bug ID: 112888
           Summary: [14 Regression] RISCV ICE: in
                    compute_lcm_local_properties, at
                    config/riscv/riscv-vsetvl.cc:2695
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: patrick at rivosinc dot com
  Target Milestone: ---

Created attachment 56820
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56820&action=edit
-freport-bug output

Testcase:
https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/testsuite/c-c%2B%2B-common/goacc/kernels-double-reduction-n.c;h=8f7f415b58d848cf51427c102972e248c1bcb191;hb=c9d5b46a25547035e381b0246de5cb553ca8b02d

Command:
> ./bin/riscv64-unknown-linux-gnu-gcc -march=rv64gcv 
> kernels-double-reduction-n.c -fopenacc -O2

during RTL pass: vsetvl
kernels-double-reduction-n.c: In function 'foo._omp_fn.0':
kernels-double-reduction-n.c:18:9: internal compiler error: in
compute_lcm_local_properties, at config/riscv/riscv-vsetvl.cc:2695
   18 | #pragma acc kernels copyin (a[0:n]) copy (sum) /* { dg-message
"optimized: assigned OpenACC gang loop parallelism" } */
      |         ^~~
0xac6f4b pre_vsetvl::compute_lcm_local_properties()
        ../../../gcc/gcc/config/riscv/riscv-vsetvl.cc:2695
0x173b419 pre_vsetvl::earliest_fuse_vsetvl_info()
        ../../../gcc/gcc/config/riscv/riscv-vsetvl.cc:2884
0x173d5d9 pass_vsetvl::lazy_vsetvl()
        ../../../gcc/gcc/config/riscv/riscv-vsetvl.cc:3531
0x173d93f pass_vsetvl::execute(function*)
        ../../../gcc/gcc/config/riscv/riscv-vsetvl.cc:3578
0x173d93f pass_vsetvl::execute(function*)
        ../../../gcc/gcc/config/riscv/riscv-vsetvl.cc:3561
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.

Looks like the newly added assert is firing:
https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/config/riscv/riscv-vsetvl.cc;h=68f0be7e81d124dde4537761719c93902992af2f;hb=c9d5b46a25547035e381b0246de5cb553ca8b02d#l2695

Reply via email to