-
Notifications
You must be signed in to change notification settings - Fork 11.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[flang] Check that DO index variables are definable
We're letting immutable objects appear as DO index variables; catch and diagnose this error. Differential Revision: https://reviews.llvm.org/D142767
- Loading branch information
Showing
2 changed files
with
17 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
! RUN: %python %S/test_errors.py %s %flang_fc1 | ||
subroutine sub(j) | ||
integer, intent(in) :: j | ||
!ERROR: 'j' may not be used as a DO variable | ||
!BECAUSE: 'j' is an INTENT(IN) dummy argument | ||
do j = 1, 10 | ||
end do | ||
end |