1 ! RUN: %python %S/test_errors.py %s %flang_fc1 -pedantic
3 ! The BIND statement specifies the BIND attribute for a list of variables and
12 procedure(proc
) :: pc1
13 !ERROR: Only variable and named common block can be in BIND statement
15 !ERROR: Only variable and named common block can be in BIND statement
18 !ERROR: BIND_C attribute was already specified on 'sub'
19 !ERROR: Only variable and named common block can be in BIND statement
22 !PORTABILITY: Global name 'm' conflicts with a module
23 !PORTABILITY: Name 'm' declared in a module should not have the same name as the module
24 bind(c
) :: m
! no error for implicit type variable
29 !ERROR: Only variable and named common block can be in BIND statement
32 enum
, bind(c
) ! no error
33 enumerator
:: SUNDAY
, MONDAY
36 integer :: x
, y
, z
= 1
38 bind(c
) :: x
, /blk
/, z
! no error for variable and common block
40 bind(c
) :: implicit_i
! no error for implicit type variable
42 !ERROR: 'implicit_blk' appears as a COMMON block in a BIND statement but not in a COMMON statement
43 bind(c
) :: /implicit_blk
/
47 subroutine sub() bind(c
)