Possible to use algebraic expression as array subscript?

Dear Fortran community,
is it possible to use an algebraic expression of integers as the subscripts of an array A, for accessing or for manipulating elements of an array?
I would like to implement following code:
DO i = 1,N1
DO j = 1,N2
A((i+j),((i-1)*(j-1)+j)) = ...

It appears that the compiler requires, that the resulting indices are not out of the range which was used to initalize the matrix.
Thank you

Yes. Integer valued expressions are fine as subscript values. Those values are required to be within the range [lower_bound, upper_bound] for each dimension. That is a standard requirement, which some compilers enforce.

Thank you @billlong, this clarifies it