[Bug fortran/44773] New: [4.6 Regression] Unnecessary temporaries increase the runtime for channel.f90 by ~70%

dominiq at lps dot ens dot fr gcc-bugzilla@gcc.gnu.org
Thu Jul 1 21:22:00 GMT 2010


At revision 161670, gfortran creates unneeded temporaries (not created up to
r161462), for instance

[macbook] lin/test% gfc -O3 -ffast-math -Warray-temporaries channel.f90
channel.f90:148.11:

    dudx = ddx(u(:,:,mid))
           1
Warning: Creating array temporary at (1)
channel.f90:149.11:

    dvdy = ddy(v(:,:,mid))
           1
Warning: Creating array temporary at (1)
channel.f90:150.11:

    dhdx = ddx(h(:,:,mid))
           1
Warning: Creating array temporary at (1)
channel.f90:151.11:

    dhdy = ddy(h(:,:,mid))
           1
Warning: Creating array temporary at (1)

rsulting in a ~70% increase in the execution time

[macbook] lin/test% time a.out > /dev/null
5.099u 0.032s 0:05.13 99.8%     0+0k 0+0io 0pf+0w

compared to

[macbook] lin/test% gfcf -O3 -ffast-math -Warray-temporaries channel.f90       
                                                                      [macbook]
lin/test% time a.out > /dev/null
2.964u 0.006s 0:02.99 98.9%     0+0k 0+0io 0pf+0w

I suspect that revision 161550 is the cause.


-- 
           Summary: [4.6 Regression] Unnecessary temporaries increase the
                    runtime for channel.f90 by ~70%
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dominiq at lps dot ens dot fr


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



More information about the Gcc-bugs mailing list