https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83967
--- Comment #4 from RafaĆ Mszal <hurwic8 at gmail dot com> --- Created attachment 43210 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43210&action=edit Basic example of main funtion with LTO failure. This is simple example of observed LTO issue. RTC1_IRQHandler is removed despite it is used to change volatile variable. RTC1_IRQHandler is defined weak in the assembler startup file.