view gcc/testsuite/gfortran.dg/char_associated_1.f90 @ 152:2b5abeee2509

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents 84e7813d76e9
children
line wrap: on
line source

! Check that associated works correctly for character arrays.
! { dg-do run }
program main
  character (len = 5), dimension (:), pointer :: ptr
  character (len = 5), dimension (2), target :: a = (/ 'abcde', 'fghij' /)
  ptr => a
  if (.not. associated (ptr, a)) STOP 1
end program main