https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38534
--- Comment #17 from Jakub Jelinek <jakub at gcc dot gnu.org> --- E.g. shouldn't it at least be disabled for -O0 and -Og and shouldn't we somehow indicate in DWARF unwind info that the callee saved registers weren't saved and were clobbered? Even if backtrace itself still works make it clear that if debugger unwinds to caller frame that certain registers have unknown values rather than the restored ones.