This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [ada] fix garbage collection problem
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: rth at redhat dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sun, 23 Dec 01 18:43:09 EST
- Subject: Re: [ada] fix garbage collection problem
gnu_loop_var was garbage collected. I'm not sure if this
value was supposed to also be on some global datastructure
that is marked
No, it's not. I guess I never thought about nested functions
occurring inside a loop. I did fix some similar bugs recently, with
nested functions occurring in other odd places.
The following fixes the problem for me.
Ok?
I guess so. It's a bit more costly in memory, but it does avoid having
to adopt kludges to keep things out of local variables since nested
function can occur in a huge number of places.
Thanks for tracking this down.