This is the mail archive of the
mailing list for the GNU Fortran project.
Re: [Patch, fortran] PR29451 - Fortran runtime error: Attempt to allocate a negative amount of memory...]
- From: FX Coudert <fxcoudert at gmail dot com>
- To: Paul Thomas <paulthomas2 at wanadoo dot fr>
- Cc: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>, patch <gcc-patches at gcc dot gnu dot org>, "'fortran at gcc dot gnu dot org'" <fortran at gcc dot gnu dot org>
- Date: Tue, 17 Oct 2006 00:11:40 +0200
- Subject: Re: [Patch, fortran] PR29451 - Fortran runtime error: Attempt to allocate a negative amount of memory...]
- References: <4533A4AE.email@example.com> <20061016164040.GB56743@troutmask.apl.washington.edu> <4534021B.firstname.lastname@example.org>
Looking further, I find that
print *, ubound (soda, 1), ubound (soda, 2)
print *, ubound (soda)
outputs on the first call to the procedure:
So, I think something is not right with the vector version of
ubound for this case.
Since I am convinced that this patch is doing the right thing, I
if (.not.any(lbound (soda) <= ubound (soda))) call abort ()
with what should be the equivalent
if ((lbound (soda, 1) > ubound (soda, 1)) .and. &
(lbound (soda, 2) > ubound (soda, 2))) call abort ()
As far as you open a PR so that we don't loose track of this problem,
I'm fine with that.