brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1020 B · c0d2fa1 Raw
34 lines · plain
1! RUN: %python %S/test_errors.py %s %flang_fc1 -pedantic2! Check for C15213! If proc-language-binding-spec (bind(c)) is specified, the proc-interface4! shall appear, it shall be an interface-name, and interface-name shall be5! declared with a proc-language-binding-spec.6 7module m8 9  interface10    subroutine proc1() bind(c)11    end12    subroutine proc2()13    end14  end interface15 16  interface proc317    subroutine proc3() bind(c)18    end19  end interface20 21  procedure(proc1), bind(c) :: pc1 ! no error22  procedure(proc3), bind(c) :: pc4 ! no error23 24  !ERROR: An interface name with the BIND attribute must appear if the BIND attribute appears in a procedure declaration25  procedure(proc2), bind(c) :: pc226 27  !ERROR: An interface name with the BIND attribute must appear if the BIND attribute appears in a procedure declaration28  procedure(integer), bind(c) :: pc329 30  !ERROR: An interface name with the BIND attribute must appear if the BIND attribute appears in a procedure declaration31  procedure(), bind(c) :: pc532 33end34