8 Jul 2023 1:20
#30426
The following code run as expected when compiled with the 64 bit compiler.
With the 32 bit compiler, an access violation occurs when printing hypot(x2,y2).
program test
implicit none
real x1, y1, z1
real*8 x2, y2, z2
x1 = 3.0
y1 = 4.0
z1 = hypot(x1,y1)
print*, x1, y1, z1
print*, x1, y1, hypot(x1,y1)
x2 = 3.d0
y2 = 4.d0
z2 = hypot(x2,y2)
print*, x2, y2, z2
print*, x2, y2, hypot(x2,y2) !Problem occurs here with 32 bit compiler
end program test