This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

ARM Compiler 6.7: bug in size optimization?

Source of main.cpp:

typedef void (* fun_t)( void );

static const fun_t fun = [] { for (;;); };

int main( void )
{
        fun();
}


Listing:

...
    Region$$Table$$Base
    Region$$Table$$Limit
    main

** Section #2 '.debug_frame' (SHT_PROGBITS)
    Size   : 68 bytes
...


Map file:

...
    Removing main.o(.text), (0 bytes).
    Removing main.o(.ARM.exidx.text.main), (8 bytes).
    Removing main.o(.ARM.use_no_argv), (4 bytes).
...


Why main function was removed?