xref: /llvm-project/flang/test/Semantics/bind-c13.f90 (revision 91917387648f5638058f7f9391f144b8858c4975)
1! RUN: %python %S/test_errors.py %s %flang_fc1 -pedantic
2! Interoperable objects that require descriptors cannot be CONTIGUOUS
3subroutine interop(ptr,ashape,arank,eshape,asize) bind(c)
4  !ERROR: An interoperable pointer must not be CONTIGUOUS
5  real, pointer, contiguous :: ptr(:)
6  real, contiguous :: ashape(:) ! ok
7  real, contiguous :: arank(..) ! ok
8  !PORTABILITY: CONTIGUOUS entity 'eshape' should be an array pointer, assumed-shape, or assumed-rank
9  real, contiguous :: eshape(10)
10  !PORTABILITY: CONTIGUOUS entity 'asize' should be an array pointer, assumed-shape, or assumed-rank
11  real, contiguous :: asize(*)
12end
13