This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/43404] ARM: Internal compiler error when using '&foo' in naked function



------- Comment #6 from marti at juffo dot org  2010-03-19 14:46 -------
(In reply to comment #5)
> I think the compiler should throw an error if there are any statements in the
> naked function other than asm statements.

This would break a lot of code; there are use cases where you want to
save/restore the stack frame yourself, but still use C code in the middle. And
on ARM you can go a long way without needing to spill over to the stack.

For example:
* Nut/OS context switching code,
http://www.ethernut.de/api/context_8c-source.html#l00156
* Interrupt handlers that use macros which also push r0-r3 and spsr, which
otherwise not stored in GCC's stack frame:
http://www.ethernut.de/api/ih__at91ssc_8c-source.html#l00068


-- 


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]