I have a fortran subroutine called SNOW3L that takes several variables as intent in (see code below).
When I print the variables passed in this routine (INTG1, INTG2, CHAR1, ARR1 and ARR2), the values of INTG1, INTG2 and CHAR1 are OK and corresponds to the value of these variables before entering the routine. However, printing ARR1, ARR2 returns the following error : *"Segmentation fault - invalid memory reference" *
The code however works when I define the dimension of the intent(in) arrays (==> REAL, DIMENSION(KSIZE), INTENT(IN)).
Does anybody know why do I have such an error when the dimension of the intent(in) arrays are not explicitely defined ?
Thank you.
N3L
SUBROUTINE SNOW3L(INTG1,INTG2,CHAR1,ARR1,ARR2)
IMPLICIT NONE
INTEGER, INTENT(IN) :: INTG1,INTG2
CHARACTER(LEN=*), INTENT(IN) :: CHAR1
REAL, DIMENSION(:), INTENT(IN) :: ARR1, ARR2
..................................................