Commit 3bcab6f
authored
[flang][OpenMP][Semantics] improve semantic checks for array sections (llvm#132230)
I'm not sure why strides were not allowed in array sections: the stride
is explicitly allowed by the standard from the first version where array
sections were introduced. The limitation is that the stride must not be
negative.
Here I have added the check for a negative stride and updated the test
for a zero length section to take account of the stride.1 parent 44261da commit 3bcab6f
File tree
2 files changed
+35
-18
lines changed- flang
- lib/Semantics
- test/Semantics/OpenMP
2 files changed
+35
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5363 | 5363 | | |
5364 | 5364 | | |
5365 | 5365 | | |
| 5366 | + | |
| 5367 | + | |
| 5368 | + | |
| 5369 | + | |
| 5370 | + | |
| 5371 | + | |
| 5372 | + | |
| 5373 | + | |
| 5374 | + | |
| 5375 | + | |
| 5376 | + | |
| 5377 | + | |
| 5378 | + | |
5366 | 5379 | | |
5367 | 5380 | | |
5368 | 5381 | | |
5369 | 5382 | | |
5370 | 5383 | | |
5371 | | - | |
5372 | | - | |
5373 | | - | |
5374 | | - | |
5375 | | - | |
5376 | | - | |
5377 | | - | |
5378 | | - | |
5379 | | - | |
5380 | | - | |
5381 | | - | |
5382 | | - | |
5383 | | - | |
5384 | | - | |
5385 | | - | |
5386 | | - | |
| 5384 | + | |
| 5385 | + | |
| 5386 | + | |
| 5387 | + | |
| 5388 | + | |
| 5389 | + | |
| 5390 | + | |
| 5391 | + | |
| 5392 | + | |
| 5393 | + | |
| 5394 | + | |
| 5395 | + | |
| 5396 | + | |
5387 | 5397 | | |
5388 | 5398 | | |
5389 | 5399 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
22 | 29 | | |
23 | 30 | | |
24 | 31 | | |
| |||
0 commit comments