From: Jan Hubicka <hubicka@ucw.cz>
To: Xinliang David Li <davidxl@google.com>, ebotcazou@adacore.com
Cc: Jan Hubicka <hubicka@ucw.cz>, GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [google]: initialize language field for clone function struct
Date: Tue, 03 May 2011 16:46:00 -0000 [thread overview]
Message-ID: <20110503164614.GB18705@kam.mff.cuni.cz> (raw)
In-Reply-To: <BANLkTi=K4gAKxTFddGxTqcARWfBCnaFVYQ@mail.gmail.com>
> In fold-const.c, there are many of calls to
> lang_hooks.decls.global_bindings_p, and the implementation of this in
> name-lookup.h will look at the the cfun->language
>
>
> #define cp_function_chain (cfun->language)
>
> #define current_binding_level \
> (*(cfun && cp_function_chain && cp_function_chain->bindings \
> ? &cp_function_chain->bindings \
>
> int
> global_bindings_p (void)
> {
> return global_scope_p (current_binding_level);
> }
>
>
> In gcc 4.4.3, current_binding_level is defined in a way that
> cp_function_chain->bindings is not guarded, resulting in segfault for
> clones. In trunk, this is guarded -- but not setting language field
> for clone probably just hide the problem.
Indeed, it seems to me that global_bindings_p should go, clearly the LTO does
not preserve its behaviour in any sane way.
I am however completely missing the point of this langhook and doc is not exactly
informative either:
/* Returns nonzero if we are in the global binding level. Ada
returns -1 for an undocumented reason used in stor-layout.c. */
What is the purpose of this hook?
Honza
next prev parent reply other threads:[~2011-05-03 16:46 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-30 1:34 Xinliang David Li
2011-05-02 22:13 ` Xinliang David Li
2011-05-03 10:55 ` Jan Hubicka
2011-05-03 16:15 ` Xinliang David Li
2011-05-03 16:46 ` Jan Hubicka [this message]
2011-05-03 18:55 ` Eric Botcazou
2011-05-03 19:07 ` Joseph S. Myers
2011-05-03 19:16 ` Nathan Froyd
2011-05-03 19:51 ` Joseph S. Myers
2011-05-03 20:05 ` Nathan Froyd
2011-05-03 19:52 ` Eric Botcazou
2011-05-03 20:09 ` Joseph S. Myers
2011-05-03 20:36 ` Eric Botcazou
2011-05-03 21:27 ` Joseph S. Myers
2011-05-04 8:53 ` Eric Botcazou
2011-05-04 17:27 ` Tom Tromey
2011-05-04 9:52 ` Richard Guenther
2011-05-04 10:02 ` Eric Botcazou
2011-05-04 10:30 ` Joseph S. Myers
2011-05-04 11:01 ` Eric Botcazou
2011-05-04 11:50 ` Richard Kenner
2011-05-04 12:23 ` Diego Novillo
2011-05-04 12:27 ` Richard Kenner
2011-05-04 12:31 ` Diego Novillo
2011-05-04 13:16 ` Michael Matz
2011-05-04 13:22 ` Nathan Froyd
2011-05-04 13:26 ` Diego Novillo
2011-05-04 13:39 ` Richard Kenner
2011-05-04 11:19 ` Richard Guenther
2011-05-04 12:00 ` Michael Matz
2011-05-04 12:08 ` Richard Guenther
2011-05-04 15:33 ` Eric Botcazou
2011-05-04 16:05 ` Richard Guenther
2011-05-04 17:22 ` Eric Botcazou
2011-05-05 9:07 ` Richard Guenther
2011-05-05 9:25 ` Eric Botcazou
2011-05-05 9:44 ` Richard Guenther
2011-05-05 10:22 ` Eric Botcazou
2011-05-05 11:03 ` Richard Guenther
2011-05-05 11:59 ` Eric Botcazou
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=20110503164614.GB18705@kam.mff.cuni.cz \
--to=hubicka@ucw.cz \
--cc=davidxl@google.com \
--cc=ebotcazou@adacore.com \
--cc=gcc-patches@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).