This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: ppc and maybe also other cpu's stack problem
- To: gcc at gcc dot gnu dot org
- Subject: Re: ppc and maybe also other cpu's stack problem
- From: "Thomas R. Truscott" <trt at cs dot duke dot edu>
- Date: Mon, 10 Jul 2000 12:39:00 -0400 (EDT)
The following allocates two copies of struct dumdidum on stack:
> void func(void)
> {
> { struct dumdidum big; DoSomething(&big); }
> { struct dumdidum big; DoSomething(&big); }
> }
The reason is that preserve_temp_slots in function.c
decrements the "level" of the struct when its address
is taken, in case it is used as a result
of a ({...}) construct (see comment on lines 1086..1093 of function.c
Obviously in this case no ({...}) construct is involved.
There may be a simple fix for this simple case,
but preseve_temp_slots is called from lots of places which was
worrisome, and also some of the comments seemed at odds with the code.
I suspect this code is mostly in limbo, awaiting
a more comprehensively efficient way to allocate stack space.
Tom Truscott