public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "gcc.ourteddybear at xoxy dot net" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/48470] ICE in expand_expr_addr_expr_1 at expr.c:6835
Date: Tue, 26 Jul 2011 15:57:00 -0000	[thread overview]
Message-ID: <bug-48470-4-i6WXbbau9s@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-48470-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48470

--- Comment #3 from Stephen Cleary <gcc.ourteddybear at xoxy dot net> 2011-07-26 15:56:40 UTC ---
(In reply to comment #2)
> The test case reduces to the following:
> void __attribute__((naked)) f(void)
> {
>     int x = 0;
>     g(&x);
> }
> It ICEs 4.4.5, 4.5.2, and 4.6.0, but not 4.3.5, 4.2.4, or 4.1.2.
> I suspect it isn't valid to make recursive calls or take the address of local
> variables in naked functions.

It is important to note, however, that the original test case does not take the
address of a local variable in a naked function. The original test case is like
this:

static void g(void);
void __attribute__((naked)) f(void)
{
    g();
}
void g(void)
{
    int x = 0;
    h(&x);
}

So this may be due to overzealous inlining.


  parent reply	other threads:[~2011-07-26 15:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-05 19:41 [Bug c/48470] New: " gcc.ourteddybear at xoxy dot net
2011-04-05 22:30 ` [Bug c/48470] " mikpe at it dot uu.se
2011-04-06 19:48 ` [Bug middle-end/48470] " mikpe at it dot uu.se
2011-07-26 15:57 ` gcc.ourteddybear at xoxy dot net [this message]
2015-08-03 19:35 ` law at gcc dot gnu.org
2015-08-03 19:36 ` law at redhat dot com

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=bug-48470-4-i6WXbbau9s@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).