[Bug testsuite/32841] FAIL: gfortran.dg/edit_real_1.f90 on Darwin8

dominiq at lps dot ens dot fr gcc-bugzilla@gcc.gnu.org
Mon Jul 23 15:03:00 GMT 2007



------- Comment #10 from dominiq at lps dot ens dot fr  2007-07-23 15:03 -------
This a regression from 4.2. The following code

real(8) x, y
real(8) down, up
x = huge(x)
y = down(x)
print *, y, up(y)-x, up(up(y))-x, up(up(x))-x
y = up(y)
print *, x, y
end
real(8) function up(x)
real(8) x
up = nearest(x, 1.0d0)
end
real(8) function down(x)
real(8) x
down = nearest(x, -1.0d0)
end

gives with GNU F95 version 4.2.0 (powerpc-apple-darwin8):

  1.797693134862316E+308   0.00000000000000                    +Infinity       
       +Infinity
  1.797693134862316E+308  1.797693134862316E+308

and with GNU F95 version 4.3.0 20070713 (experimental) (powerpc-apple-darwin8)

  1.797693134862316E+308   0.00000000000000                    +Infinity       
       +Infinity
               +Infinity               +Infinity


So the problem seems related to the output and not to a constant folding.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32841



More information about the Gcc-bugs mailing list