Debian Codegraph @

gcc/testsuite/gfortran.dg/dec_loc_rval_1.f90

raw
1 ! { dg-do run }
2 ! { dg-options "-std=legacy" }
3 !
4 ! Test the usage of %loc as an rvalue.
5 !
6 program main
7 implicit none
8
9 integer :: i, j, k
10
11 i = loc(j)
12 k = %loc(j)
13
14 if (i .ne. k) then
15 print *, "bad %loc value"
16 STOP 1
17 endif
18
19 end