-
Notifications
You must be signed in to change notification settings - Fork 25
Closed
Labels
Milestone
Description
IBM compiler allows decimal values in reference modifiers and emits an error when using negative values.
In our current implementation, no diagnostic is created for both of these cases. To improve our error reporting, we should:
- emit an error on negative index/length (same for zero index or length)
- emit a warning on decimal index/length
Code to check:
MOVE item(0:5) TO part
MOVE item(1:0) TO part
MOVE item(0:0) TO part
MOVE item(-1:5) TO part
MOVE item(1:-5) TO part
MOVE item(-1:-5) TO part
MOVE item(1.32:5) TO part
MOVE item(1:5.84) TO part
MOVE item(1.32:5.84) TO part
MOVE item(0.0:5) TO part
MOVE item(1:0.0) TO part
MOVE item(0.0:0.0) TO part
MOVE item(-1.32:5) TO part
MOVE item(1:-5.84) TO part
MOVE item(-1.32:-5.84) TO part