Re: Fortran 90 runtime range checking array subscripts (11894 Views)
Reply
Occasional Contributor
Richard Schmidt
Posts: 6
Registered: ‎11-25-1996
Message 1 of 2 (11,894 Views)

Fortran 90 runtime range checking array subscripts

Using the compile flag +check=all, Fortran 90 on HPUX 11.11 (B11.11.93) would trap and abort on array subscripts out of range,and point to the correct source line:
"FORTRAN RANGE ERROR 950: SUBSCRIPT, SUBSTRING, OR PARAMETER OUT OF BOUNDS AT LINE NUMBER 8".

But the same code and compile option with HP-UX f90 B.11.31.03 (Itanium(R)-based host and target) gives only the warning
*** FORTRAN RANGE ERROR 950: SUBSCRIPT, SUBSTRING, OR PARAMETER OUT OF BOUNDS in file at line 1556 in arra with dimension 33487"
and does not abort. See the attached code sample. Is there any way to bring back the "abort on array subscript out-of-bound" on Fortran 90 for HP-UX 11.31? Thanks!
Acclaimed Contributor
Dennis Handly
Posts: 25,296
Registered: ‎03-06-2006
Message 2 of 2 (11,894 Views)

Re: Fortran 90 runtime range checking array subscripts

I don't see any code to abort. All calls to FTN_RANGE_ERR just return.

You'll need to contact the Response Center with your enhancement request.

Using +check= with aC++ or C will continue after each error but then abort at the end so you can see all of your errors. But it is customizable (RTC_NO_ABORT) to abort on the first.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.