35 lines · plain
1! RUN: %python %S/test_errors.py %s %flang_fc12 3module m4interface5 module subroutine dump()6 end subroutine7end interface8 integer, bind(c, name="a") :: x19 integer, bind(c) :: x210end11 12subroutine sub()13 !ERROR: A variable with BIND(C) attribute may only appear in the specification part of a module14 integer, bind(c, name="b") :: x315 !ERROR: A variable with BIND(C) attribute may only appear in the specification part of a module16 integer, bind(c) :: x417end18 19program main20 !ERROR: A variable with BIND(C) attribute may only appear in the specification part of a module21 integer, bind(c, name="c") :: x522 !ERROR: A variable with BIND(C) attribute may only appear in the specification part of a module23 integer, bind(c) :: x624end25 26submodule(m) m227 !ERROR: A variable with BIND(C) attribute may only appear in the specification part of a module28 integer, bind(c, name="d") :: x729 !ERROR: A variable with BIND(C) attribute may only appear in the specification part of a module30 integer, bind(c) :: x831contains32 module procedure dump33 end procedure34end35