This subroutine gives wrong results.

The variables a and b should be able to hold positive inetegers up to 2 billion or so, so the result should be good to 4e+18 or so. None of these ansawers come out right.

==========================================================

subroutine test_i8

integer*4 a/1000000000/

integer*4 b/1000000000/

integer*4 a1,b1

integer*8 ab

ab=a*b

b1=ab/a

a1=ab/b

print '(1x,a,i20)',"ab=",ab

print *,'a1=',a1

print *,'b1=',b1

end

# Integer*8 does not work ????

For more complete information about compiler optimizations, see our Optimization Notice.