public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Bingfeng Mei" <bmei@broadcom.com>
To: "gcc@gcc.gnu.org" <gcc@gcc.gnu.org>
Subject: How to avoid a tree node being garbage collected after C  frontend?
Date: Mon, 09 Nov 2009 17:05:00 -0000	[thread overview]
Message-ID: <7FB04A5C213E9943A72EE127DB74F0AD93CCCB3E96@SJEXCHCCR02.corp.ad.broadcom.com> (raw)

Hello,
I need to pass a tree node (section name from processing pragmas)
from C frontend to main GCC body (used in TARGET_INSERT_ATTRIBUTES). 
I store the node in a global pointer array delcared in target.c.
But the tree node is garbage collected in the end of c-parser
pass, and causes an ICE later on. I am not familiar with GC part 
at all. How to prevent this from hanppening?

I checked other targets. It seems v850 almost uses the same approach
to implement section name pragma. Not sure if it has the same problem.
Also the issue is very sensitive to certain condition. For example, with
-save-temps option the bug disappear. 

Thanks,
Bingfeng Mei

             reply	other threads:[~2009-11-09 17:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-09 17:05 Bingfeng Mei [this message]
2009-11-09 19:00 ` Ian Lance Taylor
2009-11-10 11:01   ` Bingfeng Mei
2009-11-10 12:19     ` Basile STARYNKEVITCH
2009-11-10 13:21       ` Bingfeng Mei

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7FB04A5C213E9943A72EE127DB74F0AD93CCCB3E96@SJEXCHCCR02.corp.ad.broadcom.com \
    --to=bmei@broadcom.com \
    --cc=gcc@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).