An old patch: [Fwd: Re: [G95-develop] Expression reordering]

Tobias Schlüter tobias.schlueter@physik.uni-muenchen.de
Fri Mar 26 19:51:00 GMT 2004


Paul Brook wrote:
> 
> As you say there is no way to represent the semantics we desire in the current 
> gcc backend. The current optimiser behaviour should be correct but overly 
> conservative.
> 

I thought about this some more, and putting a C sequence point in places 
where the optimizer shouldn't optimize across (i.e. parentheses in 
fortran) should do the trick, even if the optimizers become more 
aggressive, but as nobody has suggested this on the gcc list, I guess 
there must be more to it than I think.

> If you could update your patch, it would be more than welcome. Even if we 
> can't pass the information on to the backend I would still like to get it 
> right in the frontend. During translation to gcc trees we can just skip it 
> and move to the contained expression.
> 
> There are probably a few other places that may need to be taught about this 
> new operator. Expression resolution routines, the tree dumper (invoked using 
> -fdump-parse-tree), and folding/simplification spring to mind.
> 

Yeah, I had accidentally not included those parts. They were included in 
the first patch I had sent to the g95 list back then. I attached that 
patch below, the matchexpr.c part needs to be replaced with the one I 
posted before. Sorry, for some reason I can't cut&paste currently.

> I'm afraid you will need a gcc copyright assignment before we can accept 
> patches from you. Alternatively please file a bug report so we don't forget 
> about this issue, possibly referencing this thread.

Since I posted that patch well before g95 forked, I think my copyright 
assignment should suffice. If you still think that's not the case, I'll 
file a bug and see if I can get a new Copyright Assignment in place. 
Whom do I have to contact?

Regards,
- Tobi
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Part 1.2.txt
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20040326/abddaa8f/attachment.txt>


More information about the Fortran mailing list