Fix PR21034

Paul Brook paul@codesourcery.com
Wed Jun 22 19:53:00 GMT 2005


On Wednesday 22 June 2005 18:56, Paul Thomas wrote:
> Paul,
>
> Should you not make you testcase really belt-and-braces by giving the
> string a value and subsequently testing it?

My reason reason for making it an execute test is to make sure the second call 
is not reusing the (smaller) object for the first call, and trampling all 
over the stack.

The variables are by definition local objects a sufficiently clever optimizer 
will always be able to eliminate them. I don't think it's worth trying to be 
cleverer than the optimizers.

A compiler could make the variable a large non-automatic saved variable if it 
knew the largest value of N ever used.

Paul



More information about the Fortran mailing list