This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, Fortran] PR 40246 - nullify pointer to fix ice-on-invalid-code
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: Tobias Burnus <tobias dot burnus at physik dot fu-berlin dot de>
- Cc: gcc-patches at gcc dot gnu dot org, fortran at gcc dot gnu dot org
- Date: Tue, 26 May 2009 12:16:30 -0700
- Subject: Re: [Patch, Fortran] PR 40246 - nullify pointer to fix ice-on-invalid-code
- References: <20090526185726.GA28250@physik.fu-berlin.de>
On Tue, May 26, 2009 at 08:57:40PM +0200, Tobias Burnus wrote:
> Dear all,
>
> the following patch fixes an ICE in NULLIFY, which only
> occurs if there are more than one arguments of which
> one is invalid. The problem is that new_st->next is
> freed but new_st.next still points to the old memory
> address.
>
> For the test case I have, it does not matter, but I
> think one also needs to free new_st->expr1 and ->expr2,
> even though valgrind shows no difference for the
> attached example.
>
> The other question is whether one needs a test case or
> not. I included one ...
>
> Build on x86-64-linux and currently regtesting.
> OK for the trunk (assuming successful regtesting)?
>
The patch is OK.
--
Steve