We recently updated to PGI 19.10. We could generate optimized code with PGI 19.4 however the same statement yields non-optimized code in 19.10 with divide by zero floating point errors.
The statement compiles optimized code using PGI 19.4.
pgf90 -Bstatic_pgi -O2 -Msmartalloc -r8 -Msave -tp px -Kieee
The same statement in PGI 19.10 produces runtime errors. The PGI 19.10 compilation needs to be modified to the following compilation to avoid errors and run the code to the end:
pgf90 -O2 -r8 -Msave -mcmodel=medium
The PGI 19.4 compiled executable completes with the correct result in 7 minutes and the PGI 19.10 compiled executable completes with the correct result in about 5 hours.