Hi @MatColgrove, thank you for the update!
In case it is helpful, I hope to mention a slight difference between the problem here and the one in Bug of nvfortran 22.2-0: array subscript triplet handled wrongly. For the test_empty.f90
reported two weeks ago, the error can only be triggered by nvfortran -C -O3
, not by nvfortran -Mbounds
:
$ nvfortran -Mbounds test_empty.f90 && ./a.out
1 2 3
$ nvfortran -C -O3 test_empty.f90 && ./a.out
0: Subscript out of range for array a (test_empty.f90: 21)
subscript=4, lower bound=1, upper bound=3, dimension=2
However, for the test_solve.f90
here, it can be triggered by both of them, and also by nvfortran -C
:
nvfortran -Mbounds test_solve.f90 && ./a.out
0: Subscript out of range for array x (test_solve.f90: 19)
subscript=2, lower bound=1, upper bound=1, dimension=1
nvfortran -C test_solve.f90 && ./a.out
0: Subscript out of range for array x (test_solve.f90: 19)
subscript=2, lower bound=1, upper bound=1, dimension=1