Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Accept IS_CONTIGUOUS and fold it test folding is_contiguous Original-commit: flang-compiler/f18@c75a079 Reviewed-on: flang-compiler/f18#911
- Loading branch information
Showing
11 changed files
with
89 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
! Test folding of IS_CONTIGUOUS on simply contiguous items (9.5.4) | ||
! When IS_CONTIGUOUS() is constant, it's .TRUE. | ||
|
||
module m | ||
real, target :: hosted(2) | ||
contains | ||
function f() | ||
real, pointer, contiguous :: f(:) | ||
f => hosted | ||
end function | ||
subroutine test(arr1, arr2, arr3, mat) | ||
real, intent(in) :: arr1(:), arr2(10), mat(10, 10) | ||
real, intent(in), contiguous :: arr3(:) | ||
real :: scalar | ||
logical, parameter :: isc01 = is_contiguous(0) | ||
logical, parameter :: isc02 = is_contiguous(scalar) | ||
logical, parameter :: isc03 = is_contiguous(scalar + scalar) | ||
logical, parameter :: isc04 = is_contiguous([0, 1, 2]) | ||
logical, parameter :: isc05 = is_contiguous(arr1 + 1.0) | ||
logical, parameter :: isc06 = is_contiguous(arr2) | ||
logical, parameter :: isc07 = is_contiguous(mat) | ||
logical, parameter :: isc08 = is_contiguous(mat(1:10,1)) | ||
logical, parameter :: isc09 = is_contiguous(arr2(1:10:1)) | ||
logical, parameter :: isc10 = is_contiguous(arr3) | ||
logical, parameter :: isc11 = is_contiguous(f()) | ||
end subroutine | ||
end module |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters