mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-17 14:16:42 +00:00

As an extension, accept the redundant use of the CONTIGUOUS attribute when applied to scalars and to simply contiguous objects, with a portability warning.
13 lines
626 B
Fortran
13 lines
626 B
Fortran
! RUN: %python %S/test_errors.py %s %flang_fc1 -pedantic
|
|
! Interoperable objects that require descriptors cannot be CONTIGUOUS
|
|
subroutine interop(ptr,ashape,arank,eshape,asize) bind(c)
|
|
!ERROR: An interoperable pointer must not be CONTIGUOUS
|
|
real, pointer, contiguous :: ptr(:)
|
|
real, contiguous :: ashape(:) ! ok
|
|
real, contiguous :: arank(..) ! ok
|
|
!PORTABILITY: CONTIGUOUS entity 'eshape' should be an array pointer, assumed-shape, or assumed-rank
|
|
real, contiguous :: eshape(10)
|
|
!PORTABILITY: CONTIGUOUS entity 'asize' should be an array pointer, assumed-shape, or assumed-rank
|
|
real, contiguous :: asize(*)
|
|
end
|