On Sat, Jun 24, 2017 at 04:39:44PM +0100, Maxim Blinov wrote: > This question is in context of my own custom target for GCC. I just > want the compiler to be able to emit assembly for arbitrary C code, no > libraries. > > I am currently in the state where I have a very minimal but compile-able > back-end complete. Congrats :-) > However, I recieve the following error when trying to compile a minimal > C program: > > test.c: In function 'main': > test.c:4:1: sorry, unimplemented: nested functions not supported on this > target You need to define STATIC_CHAIN_REGNUM (and maybe STATIC_CHAIN_INCOMING_REGNUM and/or TARGET_STATIC_CHAIN, etc.) There also are the various TRAMPOLINE macros for the more difficult cases. Look in your ABI, it may say what register to use; if it doesn't, make something up. Segher