1 ! RUN: %S/test_errors.sh %s %t %flang_fc1
3 ! Test ASSIGN statement, assigned GOTO, and assigned format labels
4 ! (see subclause 8.2.4 in Fortran 90 (*not* 2018!)
10 integer, intent(in
) :: n
12 integer(kind
=1) :: badlab1
16 assign 1 to implicitlab1
! ok
17 !ERROR: 'badlab1' must be a default integer scalar variable
19 !ERROR: 'badlab2' must be a default integer scalar variable
21 !ERROR: 'badlab3' must be a default integer scalar variable
23 !ERROR: 'test' must be a default integer scalar variable
25 if (n
==1) goto lab
! ok
26 if (n
==1) goto implicitlab2
! ok
27 !ERROR: 'badlab1' must be a default integer scalar variable
28 if (n
==1) goto badlab1
29 !ERROR: 'badlab2' must be a default integer scalar variable
30 if (n
==1) goto badlab2
31 !ERROR: 'badlab3' must be a default integer scalar variable
32 if (n
==1) goto badlab3
33 if (n
==1) goto lab(1) ! ok
34 if (n
==1) goto lab
,(1) ! ok
35 if (n
==1) goto lab(1,1) ! ok
38 write(*,fmt
=implicitlab3
) ! ok
39 !ERROR: Format expression must be default character or integer
41 !ERROR: Format expression must be default character or integer
43 !ERROR: Format expression must be default character or integer