flang/test/Lower/c-interoperability-bindc-variables.f90
raw| 1 | ! Test lowering of BIND(C) variables |
| 2 | ! RUN: bbc -emit-fir %s -o - | FileCheck %s |
| 3 | |
| 4 | block 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/ |
| 9 | end block data |
| 10 | |
| 11 | module some_module |
| 12 | ! CHECK-LABEL: fir.global @tomato |
| 13 | integer, bind(c, name="tomato") :: apple = 42 |
| 14 | end module |