1! RUN: %S/test_errors.sh %s %t %flang_fc1 2! REQUIRES: shell 3! C1107 -- COMMON, EQUIVALENCE, INTENT, NAMELIST, OPTIONAL, VALUE or 4! STATEMENT FUNCTIONS not allow in specification part 5 6subroutine s1_c1107 7 common /nl/x 8 block 9 !ERROR: COMMON statement is not allowed in a BLOCK construct 10 common /nl/y 11 end block 12end 13 14subroutine s2_c1107 15 real x(100), i(5) 16 integer y(100), j(5) 17 equivalence (x, y) 18 block 19 !ERROR: EQUIVALENCE statement is not allowed in a BLOCK construct 20 equivalence (i, j) 21 end block 22end 23 24subroutine s3_c1107(x_in, x_out) 25 integer x_in, x_out 26 intent(in) x_in 27 block 28 !ERROR: INTENT statement is not allowed in a BLOCK construct 29 intent(out) x_out 30 end block 31end 32 33subroutine s4_c1107 34 namelist /nl/x 35 block 36 !ERROR: NAMELIST statement is not allowed in a BLOCK construct 37 namelist /nl/y 38 end block 39end 40 41subroutine s5_c1107(x,y) 42 integer x, y 43 value x 44 block 45 !ERROR: VALUE statement is not allowed in a BLOCK construct 46 value y 47 end block 48end 49 50subroutine s6_c1107(x, y) 51 integer x, y 52 optional x 53 block 54 !ERROR: OPTIONAL statement is not allowed in a BLOCK construct 55 optional y 56 end block 57end 58 59subroutine s7_c1107 60 integer x 61 inc(x) = x + 1 62 block 63 !ERROR: STATEMENT FUNCTION statement is not allowed in a BLOCK construct 64 dec(x) = x - 1 65 end block 66end 67 68