[Patch, Fortran] PR fortran/35723: Some fixes to restricted-expression handling

Daniel Kraft d@domob.eu
Fri Sep 26 12:35:00 GMT 2008


Paul Richard Thomas wrote:
> Daniel,
> 
>> I just looked briefly at that PR and the dump-tree-original, but couldn't
>> see the reason from that...  Can you give me some further hints?
>>
>>> Maybe your patch fixes the "regression" in PR35680?  If it doesn't,
>>> you are in a good position to do so.
>> It doesn't.  If you believe this can be fixed easily from my current patch
>> and I find out what the problem is, I'll happily add this of course.
> 
> There are two problems there:
> (i) The order of the specification statement and the declaration of
> 'x'.  I cited the relevant bit of the standard in the PR, I think.
> (ii) When the statements are in the right order, the specification
> expression for the function result is being evaluated in the caller
> scope, whereas x is only available in the function scope - this is
> apparent from the dump-tree-original.

I see!  However, after some thoughts, I don't think this is directly 
related to my patch proposed; I'd like to get it approved (or work on 
it) in the current version without doing something about PR 35680, if 
that's ok for you.  If there's some reason I've missed, please point it 
out :)

The problem with the declaration order is more related to my "used 
before typed" patch submitted some time ago; thus I will look into PR 
35680 and it should be relatively easy (I hope) to come up with a patch 
to at least catch the invalid case of PR 35680.

Yours,
Daniel

-- 
Done:  Arc-Bar-Cav-Rog-Sam-Val-Wiz
To go: Hea-Kni-Mon-Pri-Ran-Tou



More information about the Fortran mailing list