Debian Codegraph @

gcc/testsuite/gfortran.dg/associated_5.f90

raw
1 ! { dg-do run }
2 ! PR 35719 - associated used to fail with zero-sized automatic arrays
3 ! Test case contributed by Dick Hendrickson
4
5 program try_mf1053
6
7 call mf1053 ( 1, 2, 3, 4)
8 end
9
10 SUBROUTINE MF1053 (nf1, nf2, nf3, nf4)
11 INTEGER, pointer :: ptr(:,:)
12 INTEGER, target :: ILA1(NF2,NF4:NF3)
13
14 ptr => ILA1
15
16 if (ASSOCIATED (ptr, ILA1(NF1:NF2,NF4:NF3) ) ) STOP 1
17 if ( .not. ASSOCIATED(ptr) ) STOP 2
18
19 END SUBROUTINE