This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, Fortran] More clean-up with try-finally


Paul Richard Thomas wrote:
Dear All,

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".

gfc_add_expr_to_block (&se.pre, tmp); /* Add the return MODIFY_EXPR to the block */ gfc_add_block_to_block (&se.pre, &se.post); /* Follow it with the post block. */ tmp = gfc_generate_return (); /* and return */ gfc_add_expr_to_block (&se.pre, tmp); return gfc_finish_block (&se.pre);

You're right (and Tobias also suggested the same), I overlooked that the return'ed expression can only be a "simple" one and so this works.


I'll add this line and commit (I guess this is obvious) later today.

Thanks for spotting this!

Daniel

--
http://www.pro-vegan.info/
--
Done:  Arc-Bar-Cav-Ran-Rog-Sam-Tou-Val-Wiz
To go: Hea-Kni-Mon-Pri


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]