view gcc/testsuite/gfortran.dg/pr15140.f90 @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 84e7813d76e9
children
line wrap: on
line source

! { dg-do run }
! PR 15140: we used to fail an assertion, because we don't use the
! argument of the subroutine directly, but instead use a copy of it.
function M(NAMES)
  CHARACTER*(*) NAMES(*)
  if (any(names(1:2).ne."asdfg")) STOP 1
  m = LEN(NAMES(1))
END function M

character(5) :: c(2)
c = "asdfg"
if(m(c).ne.5) STOP 1
end