------- Comment #3 from jv244 at cam dot ac dot uk 2010-02-13 21:13 ------- testing Paul's patch (http://gcc.gnu.org/ml/fortran/2010-02/msg00093.html) on CP2K it further halved the number of pack/unpacks. However, some cases still unexpectedly resulted in a pack. A slightly modified version of the original testcase still fails:
MODULE M1 IMPLICIT NONE TYPE particle REAL :: r(3) END TYPE CONTAINS SUBROUTINE S1(p) TYPE(particle), POINTER, DIMENSION(:) :: p REAL :: a(3) INTEGER :: i a=pbc(p(i)%r) END SUBROUTINE S1 FUNCTION pbc(a) REAL :: a(3) REAL :: pbc(3) pbc=a END FUNCTION END MODULE M1 here, the only difference is that 'p' has become an argument of 'S1'. -- jv244 at cam dot ac dot uk changed: What |Removed |Added ---------------------------------------------------------------------------- GCC build triplet| |pault http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36932