xref: /llvm-project/flang/test/Lower/c-interoperability-bindc-variables.f90 (revision 10b23ae880f9ee0188d7ee97b7fc25243aa0c854)
1! Test lowering of BIND(C) variables
2! RUN: bbc -emit-fir %s -o - | FileCheck %s
3
4block data
5   integer :: x, y
6   common /fortran_name/ x, y
7   ! CHECK-LABEL: fir.global common @c_name
8   bind(c, name="c_name") /fortran_name/
9end block data
10
11module some_module
12   ! CHECK-LABEL: fir.global @tomato
13  integer, bind(c, name="tomato") :: apple = 42
14end module
15