This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: [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.


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