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

            Bug ID: 109733
           Summary: ICE in extract_insn, at recog.cc:2791 since
                    r14-475-g508f082829af68
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
                CC: ubizjak at gmail dot com
  Target Milestone: ---
              Host: x86_64-linux-gnu

I noticed the following crash:

$ cat x.f90
  use iso_c_binding
  interface
    subroutine ctest_cont (a, is_cont) bind (c, name="ctest")
    end subroutine
    subroutine ctest_ar_cont (a, is_cont) bind (c, name="ctest")
      use iso_c_binding
      integer(C_INT), contiguous :: a(..)
      logical(C_Bool), value :: is_cont
    end subroutine
  end interface
  integer(C_INT), target :: aa(10,5)
  integer(C_INT), target :: bb(10,10)
  do j = 1, 5
    do i = 1, 10
    end do
  end do
  call ftest (transpose (aa), is_cont=.true._c_bool) ! Implementation choice:
copy in; hence, contiguous
  call ftest (bb(2:10:2, :), is_cont=.false._c_bool)
contains
  subroutine ftest (a, is_cont)
    integer(C_INT) :: a(:,:)
    logical(c_bool), value, intent(in) :: is_cont
    call ctest_ar_cont (a, is_cont=.true._c_bool)
  end subroutine
  subroutine ftest_ar (a, is_cont)
  end subroutine
end program

$ gfortran x.f90 -ftree-vrp -O1 -mavx512vbmi2 -m32 -march=i686 -c
x.f90:24:16:

   24 |   end subroutine
      |                ^
Error: unrecognizable insn:
(insn 429 416 379 18 (set (reg:SI 72 k4 [orig:121 _114 ] [121])
        (mult:SI (reg:SI 70 k2 [orig:112 ubound.0 ] [112])
            (const_int 4 [0x4]))) -1
     (nil))
during RTL pass: split2
x.f90:24:16: internal compiler error: in extract_insn, at recog.cc:2791
0x1f4c694 diagnostic_impl(rich_location*, diagnostic_metadata const*, int, char
const*, __va_list_tag (*) [1], diagnostic_t)
        ???:0
0x1f4d2e6 internal_error(char const*, ...)
        ???:0
0x899ba5 fancy_abort(char const*, int, char const*)
        ???:0
0x76b68a _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
        ???:0
0x76b6a6 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
        ???:0
0x769bc3 extract_insn(rtx_insn*) [clone .cold]
        ???:0
0xef4694 extract_insn_cached(rtx_insn*)
        ???:0
0xbd7d24 cleanup_subreg_operands(rtx_insn*)
        ???:0
0xef2676 split_insn(rtx_insn*)
        ???:0
0xef7aa9 split_all_insns()
        ???:0
0xef7bb8 (anonymous namespace)::pass_split_all_insns::execute(function*)
        ???: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://gcc.gnu.org/bugs/> for instructions.

Reply via email to