view gcc/testsuite/gfortran.dg/associated_5.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 35719 - associated used to fail with zero-sized automatic arrays
! Test case contributed by Dick Hendrickson

      program try_mf1053

      call       mf1053 (  1,   2,   3,   4)
      end

      SUBROUTINE MF1053 (nf1, nf2, nf3, nf4)
      INTEGER, pointer :: ptr(:,:)
      INTEGER, target  :: ILA1(NF2,NF4:NF3)

      ptr => ILA1

      if (ASSOCIATED (ptr, ILA1(NF1:NF2,NF4:NF3) ) ) STOP 1
      if ( .not. ASSOCIATED(ptr) )  STOP 2

      END SUBROUTINE