This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: Fix PR21034
- From: Paul Brook <paul at codesourcery dot com>
- To: "Paul Thomas" <paulthomas2 at wanadoo dot fr>
- Cc: fortran at gcc dot gnu dot org
- Date: Wed, 22 Jun 2005 20:52:48 +0100
- Subject: Re: Fix PR21034
- Organization: CodeSourcery
- References: <004801c57756$039c60c0$0400000a@Paul>
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