This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] arm,rx: don't ICE on naked functions with local vars
- From: Richard Henderson <rth at redhat dot com>
- To: DJ Delorie <dj at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 28 Jul 2011 12:26:14 -0700
- Subject: Re: [patch] arm,rx: don't ICE on naked functions with local vars
- References: <201107261952.p6QJqA8s007635@greed.delorie.com>
On 07/26/2011 12:52 PM, DJ Delorie wrote:
> This patch tests for at least one user-caused reason for this
> assertion failing - requiring a local frame in a naked function. For
> this case at least, it would be better to trigger an error than to
> ICE. OK?
>
> static int bar;
> void __attribute__((naked)) function(void) {
> int foo, result;
> result = subFunction(&foo, &bar); // ICE here
> }
>
> * expr.c (expand_expr_addr_expr_1): Detect a user request for
> a local frame in a naked function, and produce a suitable
> error for that specific case.
Err... why would naked affect anything at all this early in the
compilation path?
Without an answer to that, this seems like an odd place to patch.
r~