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

Harald Anlauf <anlauf at gmx dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #45292|0                           |1
        is obsolete|                            |

--- Comment #7 from Harald Anlauf <anlauf at gmx dot de> ---
Created attachment 45322
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45322&action=edit
Extended Update of Tobias' patch to 9-trunk (except for ChangeLog)

I've updated Tobias' patch, adding a runtime library function to handle
assumed rank arrays (not sure if this is the right way).  This now works
for the following testcase:

program is_contiguous_2
  implicit none
  real, allocatable :: b(:,:)
  allocate(b(10,10))
  if (fail (b,          .true.) ) stop 1
  if (fail (b(::1,::1), .true.) ) stop 2
  if (fail (b(::2,::1), .false.)) stop 3
  if (fail (b(::1,::2), .false.)) stop 4
  if (fail (b(:10,:10), .true. )) stop 5
  if (fail (b(: 9,:10), .false.)) stop 6
contains
  pure logical function fail (x, expect)
!   type(*), dimension(..), intent(in) :: x  ! This should work, too
    real,    dimension(..), intent(in) :: x
    logical,                intent(in) :: expect
    fail = is_contiguous (x) .neqv. expect
  end function fail
end program

I don't know how to handle assumed type; I need help by somebody else
who is interested in pursuing this.

Thanks to whoever will pick this up.

Reply via email to