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.
7 lines
243 B
Fortran
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
|