If the following simple program was compiled with options of -O and -Ktrap=fp, the program would produce floating exception (core dumped). The nvfortran version is 23.1-0 64-bit target on x86-64 Linux.
The nvfortran pack two dividend in one xmm register, and two divisor in another xmm register, then generates simd instruction vdivps for the two divisions. The xmm registers contain 4 packed single precision numbers, two are dividends or divisors, the others two are set 0, which cause divide by zero floating exception by vdivps.
module mtt type :: tt real :: a, b contains procedure, pass(this) :: init => tt_init end type tt contains subroutine tt_init(this, a, b) implicit none class(tt), intent(inout) :: this real, intent(in) :: a, b this%a = a this%b = b end subroutine tt_init end module mtt program test use mtt implicit none type(tt) :: tt1, tt2 integer :: c call tt1%init(1.0, 2.0) call tt2%init(3.0, 4.0) c = tt1%a/tt2%a + tt1%b/tt2%b print*, c end program test