This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/25620] Missed optimization with power
- From: "fxcoudert at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Jan 2007 22:02:24 -0000
- Subject: [Bug fortran/25620] Missed optimization with power
- References: <bug-25620-6642@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #17 from fxcoudert at gcc dot gnu dot org 2007-01-22 22:02 -------
cbrt is now available in the front-end (among others), thanks again to Richard!
Closing this PR, as the optimization appears to be working fully:
$ cat a.f90
REAL*8 :: a(6),b(6)
read(*,*) a(:)
b(1)=a(1)**(1.D0/3.D0)
b(2)=a(2)**(1/3.D0)
b(3)=a(3)**(2.D0/3.D0)
b(4)=a(4)**(1/2.D0)
b(5)=a(5)**(1.D0/2.D0)
b(6)=a(6)**(3.D0/2.D0)
write(*,*) b
END
$ gfortran -O2 -ffast-math a.f90 -S
$ grep -c pow a.s
0
$ grep -c cbrt a.s
3
$ grep -c sqrt a.s
3
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25620