[Patch, Fortran] PR 40246 - nullify pointer to fix ice-on-invalid-code

Steve Kargl sgk@troutmask.apl.washington.edu
Tue May 26 19:16:00 GMT 2009


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



More information about the Gcc-patches mailing list