SAVE attribute for automatic shaped arrays

SAVE attribute for automatic shaped arrays

Hello everybody. I am currently writing a SUBROUTINE in which I need two variables to be saved between callings, namely et and ey.
If I declare them this way

SUBROUTINE mysub(y)
REAL(KIND=dp), DIMENSION(:) :: y
REAL(KIND=dp), SAVE :: et=0.0D0
REAL(KIND=dp), DIMENSION(SIZE(y,1)),SAVE :: ey=0.0D0

...
END SUBROUTINE mysub

the compiler complains: he doesn't like the SAVE attribute for the automatic-shaped array ey. I would like to obtain the same effect for ey, possibly without using allocatable array. I think this is a general feature in FORTRAN 90, and maybe has nothing to do with the IFORT compiler I'm using. Does anybody know how to overvcome the problem? Thank in advance.

Daniele

1 envío / 0 nuevos
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.