77 lines · plain
1! RUN: %python %S/test_errors.py %s %flang_fc12! C1107 -- COMMON, EQUIVALENCE, INTENT, NAMELIST, OPTIONAL, VALUE or3! STATEMENT FUNCTIONS not allow in specification part4 5subroutine s1_c11076 common /nl/x7 block8 !ERROR: COMMON statement is not allowed in a BLOCK construct9 common /nl/y10 end block11end12 13subroutine s2_c110714 real x(100), i(5)15 integer y(100), j(5)16 equivalence (x, y)17 block18 !ERROR: EQUIVALENCE statement is not allowed in a BLOCK construct19 equivalence (i, j)20 end block21end22 23subroutine s3_c1107(x_in, x_out)24 integer x_in, x_out25 intent(in) x_in26 block27 !ERROR: INTENT statement is not allowed in a BLOCK construct28 intent(out) x_out29 end block30end31 32subroutine s4_c110733 namelist /nl/x34 block35 !ERROR: NAMELIST statement is not allowed in a BLOCK construct36 namelist /nl/y37 end block38end39 40subroutine s5_c1107(x,y)41 integer x, y42 value x43 block44 !ERROR: VALUE statement is not allowed in a BLOCK construct45 value y46 end block47end48 49subroutine s6_c1107(x, y)50 integer x, y51 optional x52 block53 !ERROR: OPTIONAL statement is not allowed in a BLOCK construct54 optional y55 end block56end57 58subroutine s7_c110759 integer x, arr(1)60 inc(x) = x + 161 block62 !ERROR: A statement function definition may not appear in a BLOCK construct63 dec(x) = x - 164 arr(x) = x - 1 ! ok65 end block66end67 68subroutine s869 real x(1)70 associate (sf=>x)71 block72 integer :: j = 173 sf(j) = j ! looks like a statement function, but isn't one74 end block75 end associate76end77