mirror-llvm-project/flang/test/Semantics/bind-c18.f90
Peter Klausler 3de11b7062
[flang] Catch bad members of BIND(C) COMMON block (#148971)
Variables that can't be BIND(C), like pointers, can't be in a BIND(C)
common block, either.

Fixes https://github.com/llvm/llvm-project/issues/148922.
2025-07-16 09:10:26 -07:00

7 lines
243 B
Fortran

! RUN: %python %S/test_errors.py %s %flang_fc1
bind(c) :: /blk/
!ERROR: 'x' may not be a member of BIND(C) COMMON block /blk/
common /blk/ x
!BECAUSE: A scalar interoperable variable may not be ALLOCATABLE or POINTER
integer, pointer :: x
end