This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/36132] _gfortran_internal_pack on optional arguments



------- Comment #9 from jv244 at cam dot ac dot uk  2008-07-25 10:20 -------
Any plans to look into a fix for this for 4.3.X ?  This is variant of the
testcase that causes a runtime abort (trunk on x86_64-unknown-linux-gnu):

> gfortran -O2 test.f90 ; ./a.out
Operating system error: Cannot allocate memory
Memory allocation failed

> cat test.f90
MODULE M1
  INTEGER, PARAMETER :: dp=KIND(0.0D0)
CONTAINS
  SUBROUTINE S0()
    REAL(dp) :: a(5,9,3,5)
    CALL S1(a)
  END SUBROUTINE
  SUBROUTINE S1(a)
         REAL(dp), DIMENSION(45), INTENT(OUT), &
      OPTIONAL                               :: a
      IF (PRESENT(a)) CALL RANDOM_NUMBER(a)
  END SUBROUTINE S1
  SUBROUTINE S2(a)
          REAL(dp), DIMENSION(:, :), INTENT(OUT), &
      OPTIONAL                               :: a
      CALL S1(a)
  END SUBROUTINE
END MODULE M1
USE M1

CALL S0()
CALL S2()
END


-- 


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]