1! RUN: %python %S/test_errors.py %s %flang_fc1 2! Check for 8.6.4(1) 3! The BIND statement specifies the BIND attribute for a list of variables and 4! common blocks. 5 6module m 7 8 interface 9 subroutine proc() bind(c) 10 end 11 end interface 12 procedure(proc), bind(c) :: pc1 13 !ERROR: Only variable and named common block can be in BIND statement 14 bind(c) :: proc 15 !ERROR: Only variable and named common block can be in BIND statement 16 bind(c) :: pc1 17 18 !ERROR: Only variable and named common block can be in BIND statement 19 bind(c) :: sub 20 21 bind(c) :: m ! no error for implicit type variable 22 23 type my_type 24 integer :: i 25 end type 26 !ERROR: Only variable and named common block can be in BIND statement 27 bind(c) :: my_type 28 29 enum, bind(c) ! no error 30 enumerator :: SUNDAY, MONDAY 31 end enum 32 33 integer :: x, y, z = 1 34 common /blk/ y 35 bind(c) :: x, /blk/, z ! no error for variable and common block 36 37 bind(c) :: implicit_i ! no error for implicit type variable 38 39 !ERROR: 'implicit_blk' appears as a COMMON block in a BIND statement but not in a COMMON statement 40 bind(c) :: /implicit_blk/ 41 42contains 43 44 subroutine sub() bind(c) 45 end 46 47end 48