(root)/
gcc-13.2.0/
gcc/
testsuite/
gfortran.dg/
dec_loc_rval_3.f03
! { dg-do compile }
! { dg-options "-std=f2003" }
!
! Test errors for usage of %loc as an rvalue with a real standard.
!
program main
implicit none

integer, volatile :: i, j, k

k = %loc(j) ! { dg-error "Legacy Extension:" }

end