[Chapel Merge] Add an error for zippered follower iterations over

Branch: refs/heads/master
Revision: cf92579
Author: bradcray
Log Message:

Merge pull request #17934 from bradcray/fix-easy-zip-range-mismatch

Add an error for zippered follower iterations over too-small ranges

[reviewed by @e-kayrakli]

This adds an error for zippered forall loops in which the follower is a
range that does not have enough elements in it. For example:

forall (i,j) in zip(1..4, 1..3) do ...

This is a case that was already generating an error, but not a very
clear one, and represents a stepping stone toward generating similar
such errors for domains and arrays (which currently quietly pass
today, as I was learning last night).

This does not address the longstanding and much more complex to
fix case when the follower is larger than the leader. I.e., my most dreaded
Chapel bug (TM): zippered forall loops with size mismatches can silently drop iterations on the floor · Issue #11428 · chapel-lang/chapel · GitHub

I found that there was a previous attempt to create a similar error that
currently isn't being testing, and doesn't seem sound to me (in that it
compared the length of what a specific follower was being asked to
yield to the total range length). This new version checks that the
indices being iterated over are within the size bounds of the range to
avoid bad orderToIndex() calls (which were resulting in the old, less
useful error).

Modified Files:
A test/parallel/forall/zip/zipRangeMismatch.chpl

A test/parallel/forall/zip/zipRangeMismatch.good
A test/parallel/forall/zip/zipRangeMismatch2.chpl
A test/parallel/forall/zip/zipRangeMismatch2.good
M modules/internal/ChapelRange.chpl

Compare: https://github.com/chapel-lang/chapel/compare/3678ed7ab412...cf92579bbae0