My code is not working properly with HPC SDK 20.11. When debugging the code, I see a puzzling behavior of the nvfortran compiler. It seems to compile a line of code that shouldn’t compile. Both ifort and gfortran report an error at compile time for the same code.
A small, standalone reproducer is attached below. It’s also available at https://github.com/vyu16/test_nvfortran_20_11
ifort -c -o test.o test.f90 test.f90(17): error #8485: There is no matching specific function for this type bound generic function reference. [GETITEM] ierr = mapp%getitem(element, 123, "xxx", element)
gfortran -c -o test.o test.f90 test.f90:17:9: 17 | ierr = mapp%getitem(element, 123, "xxx", element) | 1 Error: Found no matching specific binding for the call to the GENERIC 'getitem' at (1)
nvfortran -c -o test.o test.f90 (no error) nvfortran -o test.x test.o dummy_module.o (no error) ./test.x (no error)
Same behavior with pgfortran in PGI 20.4. Any explanation would be appreciated!
test_nvfortran_20_11-main.zip (2.5 KB)