This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [Patch, fortran] PR 37469 invalid GMP usage on gfortran.dg/parameter_array_init_3.f90
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: Tobias Burnus <burnus at net-b dot de>
- Cc: Mikael Morin <mikael dot morin at tele2 dot fr>, correctifs gcc <gcc-patches at gcc dot gnu dot org>, gfortran <fortran at gcc dot gnu dot org>
- Date: Tue, 9 Dec 2008 11:36:21 -0800
- Subject: Re: [Patch, fortran] PR 37469 invalid GMP usage on gfortran.dg/parameter_array_init_3.f90
- References: <493EBBF8.7070601@tele2.fr> <493EBFEE.1060908@tele2.fr> <493EBB41.6030504@net-b.de>
On Tue, Dec 09, 2008 at 07:38:57PM +0100, Tobias Burnus wrote:
> Mikael Morin wrote:
> >> this patch solves a problem where find_array_element in expr.c was
> >> making some operations with GMP on non-constant expressions.
> >>
> >> The patch adds calls to gfc_reduce_init_expr to simplify the array
> >> bounds before the operations. There is no testcase
> >> (parameter_array_init_3.f90 is already on trunk), but the added
> >> gcc_assert should prevent regressions in the future.
> >>
> >> no regression on x86_64-unknown-linux-gnu.
> >>
> >> Ok for trunk ?
> >>
> > Self reviewing:
> > it's better to cleanup on failure.
> > patch updated
> >
> OK. Fantastic that PR is now fixed! (Assuming it is, but I believe and
> hope it is.)
>
I think we will need confirmation from someone that routinely
reproduces this bug. On amd64-*-freebsd, this a heisenbug. I saw
it for several weeks and tried to track it down, then it disappeared.
Thus, I think we may have a piece of unrelated code possibly stomping
on memory.
That being said, I think Mikael's patch is correct and the assert()
may help track down a memory stomping problem if that is indeed
the case.
--
Steve