When the value specified for n in ordered(n) is larger than the number of loops a segmentation fault can occur in one of two ways when attempting to print out a diagnostic for an associated depend(sink : vec):
- The iteration vector vec contains less than n items
- The iteration vector vec contains a variable that is not a loop control variable
This patch addresses both of these issues.