This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: vec<> inside GTYed struct
- From: Diego Novillo <dnovillo at google dot com>
- To: Paulo Matos <pmatos at broadcom dot com>
- Cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Fri, 19 Apr 2013 13:37:35 -0400
- Subject: Re: vec<> inside GTYed struct
- References: <19EB96622A777C4AB91610E763265F461C33D0 at SJEXCHMB14 dot corp dot ad dot broadcom dot com>
On 2013-04-19 10:21 , Paulo Matos wrote:
struct GTY(()) LOOP_INFO
{
...
vec<loop_info> infos;
You are declaring a heap vector here. Since your structure is in GC
memory, the vector must also be in GC memory. Add 'va_gc' to the
arguments; and make infos a pointer (a sad side-effect of using GC):
vec<loop_info, va_gc> *infos;
Diego.