Fortran tests with NAG

I think the library should be tested with the NAG compiler as soon as possible. Most probably, it will catch a number of issues.

This will require making the code of libfortran-support, as well as the code of FortUTF standard-conformant (at least, NAG-compatible):

  1. CALL EXIT(<EXITCODE>) should be replaced with ERROR STOP <EXITCODE> (macro-protected USE of the NAG-specific f90_unix_proc Fortran module that provides the exit subroutine is also fine, in my opinion; happy to hear about other options).
  2. It should be possible to build the library and the tests with the -kind=sequential (see here) flag. This means that all INTEGER(<int-kind>) and REAL(<real-kind>) types have to be replaced with INTEGER(selected_int_kind(<r>)) and REAL(selected_real_kind(<p>, <r>)). Here, you can find the <r> and <p> values for different <int-kind> and <real-kind> that I have identified some time ago. For example, REAL(8) should be replaced with REAL(selected_real_kind(15, 307)) (please, double-check me).

Once that is done, it's worth checking why this test fails with Runtime Error: *** Arithmetic exception: Floating invalid operation - aborting.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information