This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/31832] FAIL: gfortran.dg/integer_exponentiation_2.f90 at -O1 and above
- From: "sje at cup dot hp dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Jun 2007 22:47:38 -0000
- Subject: [Bug fortran/31832] FAIL: gfortran.dg/integer_exponentiation_2.f90 at -O1 and above
- References: <bug-31832-276@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from sje at cup dot hp dot com 2007-06-07 22:47 -------
I have looked into this bug and I think it is an HP math lib bug. The 64 bit
powf function is using %fr12R but not saving/restoring it the way it is
supposed to. I have a query in to the math lib folks to see if they can verify
my finding.
Here is a smaller test case that prints different values at -O1 or -O2 than at
-O0.
program test
real a
call run_me (-1.1, -1)
a = -1.1
end program test
subroutine run_me(a, i)
implicit none
real, intent(in) :: a
integer, intent(in) :: i
print *, a**-2.0
print *, (1/a)*(1/a)
call check_equal_r (a**-2.0, (1/a)*(1/a))
end subroutine run_me
subroutine check_equal_r (a, b)
real, intent(in) :: a, b
print *, a
print *, b
end subroutine check_equal_r
--
sje at cup dot hp dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |sje at cup dot hp dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31832