This is the mail archive of the gcc@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: Question on GGC


Hello,

> I have several global variables which are of type rtx. They are used
> in flow.c ia64.c and final.c. As stated in the internal doc with
> types. I add GTY(()) marker after the keyword 'extern'. for example:
>          extern GTY(()) rtx a;
> these 'extern's are added in regs.h which is included in flow.c ia64.c
> and final.c
> 
> However, I init 'a' at ia64_compute_frame which is defined in ia64.c
> but found 'a' incorrectly collected by ggc_collect. (I watch the
> memory location which is allocated for a, and found it is collected by
> GGC.
> 
> Is there any thing I forget to do ?

you need to add regs.h to GTFILES in Makefile.in.

Zdenek


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