------- Comment #2 from jv244 at cam dot ac dot uk 2010-02-15 07:58 ------- (In reply to comment #1) > Yes, indeed. > > In fact, S2((/(real (i),i=1,2)/)) produces calls to pack and unpack in both S0 > and S1. > > I'll take a look at it.
You did beat me again, I wanted to file the following testcase, which I believe is actually independent, but is similar to what you mentioned above: MODULE M1 CONTAINS ! OK SUBROUTINE S0 REAL, PARAMETER :: c(2)=(/1.0,2.0/) CALL S2(c) END SUBROUTINE S0 ! NOT OK SUBROUTINE S1 CALL S2((/1.0,2.0/)) END SUBROUTINE S1 SUBROUTINE S2(c) REAL, INTENT(IN) :: c(2) END SUBROUTINE S2 END MODULE M1 this 'S1' style appears also to be a rather common source of packs in CP2K -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43072