This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/39280] New: Optimizing integer power
- From: "tkoenig at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Feb 2009 19:50:02 -0000
- Subject: [Bug fortran/39280] New: Optimizing integer power
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
$ cat foo.f90
subroutine foo
implicit none
integer :: i,n
do i=1,10
n = (-1)**(i+1)
call bar(n)
end do
end subroutine foo
$ gfortran -S -O2 -fdump-tree-optimized foo.f90
...
i = i + 1;
n.0 = _gfortran_pow_i4_i4 (-1, i);
n = n.0;
bar (&n);
We could eliminate the call to _gfortran_pow_i4_i4.
--
Summary: Optimizing integer power
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: enhancement
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: tkoenig at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39280