This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, Fortran] More clean-up with try-finally
- From: Jack Howarth <howarth at bromo dot med dot uc dot edu>
- To: Daniel Kraft <d at domob dot eu>
- Cc: Fortran List <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 18 Jul 2010 17:07:03 -0400
- Subject: Re: [Patch, Fortran] More clean-up with try-finally
- References: <4C435709.9030007@domob.eu>
On Sun, Jul 18, 2010 at 09:33:29PM +0200, Daniel Kraft wrote:
> Hi,
>
> the attached patch takes my last one a step further. In
> gfc_generate_function_code, there still was some init/clean-up code (for
> instance, for bounds/recursion checking but also other stuff); this is
> now also handled via gfc_wrapped_block and the clean-up done as
> try-finally.
>
> As a side effect, I now got rid of the "return label" philosophy for
> procedures. Instead, a RETURN statement actually returns; all follow-up
> code that needs to be executed is done so as part of try-finally. I
> hope this makes the code structure clearer to the middle-end (and at
> least seems simpler and more intuitive to me).
>
> I've marked two points in the patch with an XXX comment: First, I
> created a new global variable in trans-decl that keeps track of the
> currently trans'ed procedure's gfc_symbol (instead of its return label).
> I did not find any existing feature to get it, although I may well
> image there is one. Did I miss it?
>
> Second, in gfc_trans_return, se.post is added to the code after the exit
> jump -- maybe I did completely misunderstand something, but to me this
> makes no sense (as it will not be executed anyway); I guess that this
> just never really mattered. But I may be wrong -- so can this line go?
> And if so, why can we be sure that se.post needs never be handled? And if
> I'm wrong, why?
>
> This patch passed the test-suite, but when I wanted to re-check with a
> fresh svn update, bootstrap failed (since) with
>
> Comparing stages 2 and 3
> warning: gcc/cc1-checksum.o differs
> Bootstrap comparison failure!
> gcc/dwarf2out.o differs
> gcc/recog.o differs
> gcc/reload.o differs
> gcc/i386.o differs
> gcc/reg-stack.o differs
> libiberty/hashtab.o differs.
>
> I can't image how this is related to my patch; is anyone else seeing
> this, too?
This is [Bug bootstrap/44970]. Try using gcc trunk with r162270 reverted
for now.
Jack
>
> Ok for trunk once I can bootstrap again and there are no regressions?
>
> Daniel
>
> --
> http://www.pro-vegan.info/
> --
> Done: Arc-Bar-Cav-Ran-Rog-Sam-Tou-Val-Wiz
> To go: Hea-Kni-Mon-Pri