-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[flang] Accept CONTIGUOUS attribute when redundant (#70853)
As an extension, accept the redundant use of the CONTIGUOUS attribute when applied to scalars and to simply contiguous objects, with a portability warning.
- Loading branch information
Showing
6 changed files
with
19 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
! RUN: %python %S/test_errors.py %s %flang_fc1 | ||
! 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 | ||
!ERROR: CONTIGUOUS entity 'eshape' must be an array pointer, assumed-shape, or assumed-rank | ||
!PORTABILITY: CONTIGUOUS entity 'eshape' should be an array pointer, assumed-shape, or assumed-rank | ||
real, contiguous :: eshape(10) | ||
!ERROR: CONTIGUOUS entity 'asize' must be an array pointer, assumed-shape, or assumed-rank | ||
!PORTABILITY: CONTIGUOUS entity 'asize' should be an array pointer, assumed-shape, or assumed-rank | ||
real, contiguous :: asize(*) | ||
end |
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