This is the mail archive of the
mailing list for the GCC project.
Re: [Patch, Fortran] More clean-up with try-finally
Paul Richard Thomas wrote:
>> I think this line can go.
> I do not think that I agree.
> I am hard put to do it right now but I rather think that it must be
> possible to generate an integer-scalar-expression that generates a
> post block. It certainly does no harm to leave it in :-)
Thinking about it again, I agree: One needs to take care of se.post.
However, if one simply adds the previous line, the result for the
example below is as follows. First, one returns and then one frees the
void * D.1566;
D.1566 = (void *) pstr.0;
if (D.1566 != 0B)
which doesn't make sense. (Ditto for the old code: The free came after
the "goto __return".) Thus, removing the line does neither harm nor
improve the situation. The real fix is to ensure that the clean up of
"se.post" comes before the "return".
character(len=n) :: f
end function f
end subroutine bar