public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/52546] New: -fstack-usage not working with __attribute__((naked))
@ 2012-03-09 20:34 marek.vasut at gmail dot com
  2012-03-09 21:49 ` [Bug c/52546] " ebotcazou at gcc dot gnu.org
  2012-03-09 22:53 ` marek.vasut at gmail dot com
  0 siblings, 2 replies; 3+ messages in thread
From: marek.vasut at gmail dot com @ 2012-03-09 20:34 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 52546
           Summary: -fstack-usage not working with __attribute__((naked))
    Classification: Unclassified
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: marek.vasut@gmail.com


Dear GCC hackers,

I get the following output while compiling my code (isolated snippet follows):

spl_mem_init.c: In function 'data_abort_memdetect_handler':
spl_mem_init.c:180:1: warning: -fstack-usage not supported for this target
[enabled by default]

Culprit:
void data_abort_memdetect_handler(void) __attribute__((naked));
void data_abort_memdetect_handler(void)
{
        asm volatile("subs pc, r14, #4");
}

gcc --version
arm-linux-gnueabi-gcc (Debian 4.6.2-14) 4.6.2
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Though this is observed also with stock GCC 4.6.

Is there any way to tell the compiler how much stack does a naked function
consume (or that it consumes zero stack)? Is this a GCC bug?

Thanks in advance!


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-03-09 22:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-09 20:34 [Bug c/52546] New: -fstack-usage not working with __attribute__((naked)) marek.vasut at gmail dot com
2012-03-09 21:49 ` [Bug c/52546] " ebotcazou at gcc dot gnu.org
2012-03-09 22:53 ` marek.vasut at gmail dot com

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).