1 ! RUN: %python %S/test_errors.py %s %flang_fc1
3 ! If proc-language-binding-spec (bind(c)) with NAME= is specified, then
4 ! proc-decl-list shall contain exactly one proc-decl, which shall neither have
5 ! the POINTER attribute nor be a dummy procedure.
10 subroutine proc() bind(c
)
15 !ERROR: An ABSTRACT interface may not have a BIND attribute with a name
16 subroutine aproc1() bind(c
,name
="foo")
18 subroutine aproc2() bind(c
) ! ok
22 !Acceptable (as an extension)
23 procedure(proc
), bind(c
, name
="aaa") :: pc1
, pc2
25 !ERROR: A procedure pointer may not have a BIND attribute with a name
26 procedure(proc
), bind(c
, name
="bbb"), pointer :: pc3
28 !ERROR: An internal or dummy procedure may not have a BIND(C,NAME=) binding label
29 procedure(proc
), bind(c
, name
="ccc") :: x
31 procedure(proc
), bind(c
) :: pc4
, pc5
33 !ERROR: A procedure pointer may not have a BIND attribute with a name
34 procedure(proc
), bind(c
, name
="pc6"), pointer :: pc6
36 procedure(proc
), bind(c
), pointer :: pc7
38 procedure(proc
), bind(c
) :: y
40 !WARNING: Attribute 'BIND(C)' cannot be used more than once
41 !ERROR: A procedure pointer may not have a BIND attribute with a name
42 procedure(proc
), bind(c
, name
="pc8"), bind(c
), pointer :: pc8