PSyclone
PSyclone copied to clipboard
(Closes #2027) fix for ArrayMixin._effective_shape bug
We had a bug which would cause a crash if we had an array access like a(b) where b is actually an array.
In testing this, I also realised that the ArrayAssignment2LoopsTrans transformation would incorrectly convert something like:
c(:) = a(b)
to
do idx = 1, SIZE(c,1)
c(idx) = a(b)
end do
This should in fact be:
do idx = 1, SIZE(c,1)
c(idx) = a(b(idx))
end do
This also means we have a bug in examples/nemo/scripts/utils.py because it should have converted a(b) to a(b(:)).