gfortran.fortran-torture/execute/intrinsic_set_exponent.f90 fails on Intel Darwin9 at all level of optimization. The following reduced test case shows the origin of the failure (EXPONENT for real(4), but not for real(8)):
!Program to test SET_EXPONENT intrinsic function. real*4 x,y integer*4 i,n equivalence(x, i) n = -125 x = 1024.0 y = set_exponent (x, n) print *, y, n, exponent(y) n = -126 y = set_exponent (x, n) print *, y, n, exponent(y) n = -148 y = set_exponent (x, n) print *, y, n, exponent(y) n = -149 y = set_exponent (x, n) print *, y, n, exponent(y) if ((y .ne. 0.0) .and. (exponent (y) .ne. n)) call abort() end which yields: 1.17549435E-38 -125 -125 5.87747175E-39 -126 -127 1.40129846E-45 -148 -149 0.0000000 -149 0 where the result of exponent is off by -1 for denormalized numbers (the value of 'y' is correct). This is certainly due to some changes in the OS library, but the bug may also come from the implementation of exponent in libgfortran(?). -- Summary: gfortran.fortran- torture/execute/intrinsic_set_exponent.f90 fails on Intel Darwin9 Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libfortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: dominiq at lps dot ens dot fr GCC build triplet: i686-apple-darwin9 GCC host triplet: i686-apple-darwin9 GCC target triplet: i686-apple-darwin9 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34141