Break circular dependency between FIR dialect and utilities
[llvm-project.git] / flang / test / Semantics / resolve113.f90
blob9755e280cfeb080024d33b11b88d463aced494a9
1 ! RUN: %python %S/test_errors.py %s %flang_fc1
3 module m
4 interface
5 module subroutine dump()
6 end subroutine
7 end interface
8 integer, bind(c, name="a") :: x1
9 integer, bind(c) :: x2
10 end
12 subroutine sub()
13 !ERROR: A variable with BIND(C) attribute may only appear in the specification part of a module
14 integer, bind(c, name="b") :: x3
15 !ERROR: A variable with BIND(C) attribute may only appear in the specification part of a module
16 integer, bind(c) :: x4
17 end
19 program main
20 !ERROR: A variable with BIND(C) attribute may only appear in the specification part of a module
21 integer, bind(c, name="c") :: x5
22 !ERROR: A variable with BIND(C) attribute may only appear in the specification part of a module
23 integer, bind(c) :: x6
24 end
26 submodule(m) m2
27 !ERROR: A variable with BIND(C) attribute may only appear in the specification part of a module
28 integer, bind(c, name="d") :: x7
29 !ERROR: A variable with BIND(C) attribute may only appear in the specification part of a module
30 integer, bind(c) :: x8
31 contains
32 module procedure dump
33 end procedure
34 end