gdb/testsuite: Testing with the nvfortran compiler
Currently, the Fortran test suite does not run with NVIDIA's Fortran
compiler (nvfortran).
The goal here is to get the tests running and preventing further
regressions during future work. This change does not do anything to fix
existing failures.
Teach the compiler detection about nvfortran. There is no underlying
information about whether this compiler is related to flang classic or
flang, so we cannot reuse the main and type definitions. Therefore, we
explicitly record the main method and type information observed when
using nvfortran.
The main name was extracted by trying to set breakpoints on both MAIN_
and MAIN__.
The following mapping of test to type names was used to extract how
nvfortran reports types.
info-types.exp: fortran_int4, fortran_int8, fortran_real4,
fortran_logical4
common-block.exp: fortran_real8
complex.exp: fortran_complex4 fortran_complex8
logical.exp: fortran_character1. Ran ptype on "c".
Types defined as fortran_complex16 do not compile with nvfortran, so it
was left unset.
gdb.fortran regression tests run with GNU, Intel, Intel LLVM and ACfL.
No regressions detected.
The gdb.fortran test results with nvfortran 23.3 are as follows.
Before:
# of expected passes 523
# of unexpected failures 107
# of known failures 2
# of unresolved testcases 1
# of untested testcases 7
# of duplicate test names 2
After:
# of expected passes 5696
# of unexpected failures 271
# of known failures 12
# of untested testcases 9
# of unsupported tests 5
As can be seen from the above, there are now considerably more passing
assertions.
Approved-By: Tom Tromey <tom@tromey.com>