diff options
| author | Vitaly Buka <vitalybuka@google.com> | 2024-09-12 11:01:01 -0700 |
|---|---|---|
| committer | Vitaly Buka <vitalybuka@google.com> | 2024-09-12 11:01:01 -0700 |
| commit | c74308f2b67c73c4989a1301d5f800eb61310fdd (patch) | |
| tree | 9b3dfe001546b221ea3a95d07f7ce4eb9edc8f89 /flang/test/Semantics/expr-errors06.f90 | |
| parent | 6711e8f505bb7786ffedd564f88e46eb71690eb1 (diff) | |
| parent | 885ac29910a23db923292fe3fc09d0ec105186dc (diff) | |
[𝘀𝗽𝗿] changes introduced through rebaseusers/vitalybuka/spr/main.test
Created using spr 1.3.4
[skip ci]
Diffstat (limited to 'flang/test/Semantics/expr-errors06.f90')
| -rw-r--r-- | flang/test/Semantics/expr-errors06.f90 | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/flang/test/Semantics/expr-errors06.f90 b/flang/test/Semantics/expr-errors06.f90 index 84872c7fcdbc..bdcb92cbe5e4 100644 --- a/flang/test/Semantics/expr-errors06.f90 +++ b/flang/test/Semantics/expr-errors06.f90 @@ -1,7 +1,7 @@ ! RUN: %python %S/test_errors.py %s %flang_fc1 -Werror ! Check out-of-range subscripts subroutine subr(da) - real a(10), da(2,1) + real a(10), da(2,1), empty(1:0,1) integer, parameter :: n(2) = [1, 2] integer unknown !ERROR: DATA statement designator 'a(0_8)' is out of range @@ -39,4 +39,10 @@ subroutine subr(da) print *, da(1,0) !WARNING: Subscript 2 is greater than upper bound 1 for dimension 2 of array print *, da(1,2) + print *, empty([(j,j=1,0)],1) ! ok + print *, empty(1:0,1) ! ok + print *, empty(:,1) ! ok + print *, empty(i:j,k) ! ok + !ERROR: Empty array dimension 1 cannot be subscripted as an element or non-empty array section + print *, empty(i,1) end |
