[Bug fortran/126892] New: ICE when there is a call to IS_CONTIGUOUS of a pointer assumed-rank dummy

"mikael at gcc dot gnu.org via Gcc-bugs" <[email protected]>
Newsgroups gmane.comp.gcc.bugs
Message-ID <[email protected]/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126892

            Bug ID: 126892
           Summary: ICE when there is a call to IS_CONTIGUOUS of a pointer
                    assumed-rank dummy
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mikael at gcc dot gnu.org
  Target Milestone: ---

Testcase:

subroutine s(a)
  integer, pointer, intent(in) :: a(..)
  print *, is_contiguous(a)
end subroutine

compilation output:
test_ice.f90:3:27:

    3 |   print *, is_contiguous(a)
      |                           1
internal compiler error: in gfc_get_descriptor_field, at
fortran/trans-descriptor.cc:83
0x26a07fd internal_error(char const*, ...)
        ../../src/gcc/diagnostic-global-context.cc:787
0x973541 fancy_abort(char const*, int, char const*)
        ../../src/gcc/diagnostics/context.cc:1813
0x73163a gfc_get_descriptor_field
        ../../src/gcc/fortran/trans-descriptor.cc:83
0xaeffbd conv_descriptor_span
        ../../src/gcc/fortran/trans-descriptor.cc:189
0xaeffbd gfc_conv_descriptor_span_get(tree_node*)
        ../../src/gcc/fortran/trans-descriptor.cc:199
0xb264df gfc_conv_is_contiguous_expr(gfc_se*, gfc_expr*)
        ../../src/gcc/fortran/trans-intrinsic.cc:2392
0xb3369a gfc_conv_intrinsic_is_contiguous
        ../../src/gcc/fortran/trans-intrinsic.cc:2309
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.