This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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: Fix PR21034


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


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