Debian Codegraph @

gcc/testsuite/gfortran.dg/namelist_5.f90

raw
1 ! { dg-do compile }
2 ! { dg-options "-std=f95" }
3 !
4 ! Tests the fix for PR25054 in which namelist objects with non-constant
5 ! shape were allowed.
6 !
7 ! Contributed by Joost VandeVondele <[email protected]>
8 !
9 SUBROUTINE S1(I)
10 integer :: a,b(I)
11 NAMELIST /NLIST/ a,b ! { dg-error "with nonconstant shape" }
12 a=1 ; b=2
13 write(6,NML=NLIST)
14 END SUBROUTINE S1
15 END