Added code to integrate getIndexPtr

Earlier an error message was displayed if the return type of a simple index expression was an array.
Now getIndexPtr is called instead.
conditions on Prelim bounds check

The preliminary bounds check code is run only if the boolean variable prelim_bound is set.