[Bug fortran/59345] New: _gfortran_internal_pack on compiler generated temps

Joost.VandeVondele at mat dot ethz.ch gcc-bugzilla@gcc.gnu.org
Fri Nov 29 14:31:00 GMT 2013


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

            Bug ID: 59345
           Summary: _gfortran_internal_pack on compiler generated temps
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: Joost.VandeVondele at mat dot ethz.ch

There is a missed optimization on compiler generated temporaries. Basically:

SUBROUTINE S1(A)
 REAL :: A(3)
 CALL S2(-A)
END SUBROUTINE

leads to an optimized tree that contains calls to
_gfortran_internal_pack
_gfortran_internal_unpack
__builtin_free

which should not be needed as generated temps are known to be contiguous (in
particular in this case, where it is generated on the stack).

This would help to fully resolve PR38318 .



More information about the Gcc-bugs mailing list