Adds a hint to the warning message to disable a warning and updates the tests to expect this. Also fixes a bug in the storage of canonical spelling of error flags so that they are not used after free.
13 lines
676 B
Fortran
13 lines
676 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 [-Wredundant-contiguous]
|
|
real, contiguous :: eshape(10)
|
|
!PORTABILITY: CONTIGUOUS entity 'asize' should be an array pointer, assumed-shape, or assumed-rank [-Wredundant-contiguous]
|
|
real, contiguous :: asize(*)
|
|
end
|