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

Tobias Burnus burnus@net-b.de
Wed May 27 08:32:00 GMT 2009


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)?

Tobias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nullify.diff
Type: text/x-patch
Size: 1091 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20090527/541885f3/attachment.bin>


More information about the Gcc-patches mailing list