This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/36132] _gfortran_internal_pack on optional arguments
- From: "jv244 at cam dot ac dot uk" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Jul 2008 10:20:15 -0000
- Subject: [Bug fortran/36132] _gfortran_internal_pack on optional arguments
- References: <bug-36132-6642@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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