1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 ! Test ASSIGN statement, assigned GOTO, and assigned format labels
3 ! (see subclause 8.2.4 in Fortran 90 (*not* 2018!)
10 !ERROR: Label '4' is not a branch target or FORMAT
11 4 integer, intent(in
) :: n
14 assign 1 to implicitlab1
! ok
15 !ERROR: Label '666' was not found
17 !ERROR: Label '2' was not found
20 if (n
==1) goto lab
! ok
21 if (n
==1) goto implicitlab2
! ok
22 if (n
==1) goto lab(1) ! ok
23 if (n
==1) goto lab
,(1) ! ok
24 if (n
==1) goto lab(1,1) ! ok
25 !ERROR: Label '666' was not found
26 if (n
==1) goto lab(1,666)
27 !ERROR: Label '2' was not found
28 if (n
==1) goto lab(1,2)
31 write(*,fmt
=implicitlab3
) ! ok