Debian Codegraph @

gcc/testsuite/gfortran.dg/dec_loc_rval_2.f90

raw
1 ! { dg-do compile }
2 ! { dg-options "-std=gnu" }
3 !
4 ! Test warnings for usage of %loc as an rvalue without -std=legacy.
5 !
6 program main
7 implicit none
8
9 integer, volatile :: i, j, k
10
11 i = loc(j)
12 k = %loc(j) ! { dg-warning "Legacy Extension:" }
13
14 end