[Bug rtl-optimization/38534] gcc 4.2.1 and above: No need to save called-saved registers in 'noreturn' function

lukas.graetz@tu-darmstadt.de gcc-bugzilla@gcc.gnu.org
Wed Feb 28 08:09:12 GMT 2024


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38534

--- Comment #40 from Lukas Grätz <lukas.graetz@tu-darmstadt.de> ---
(In reply to Jakub Jelinek from comment #30)
> (In reply to Lukas Grätz from comment #29)
> > I belief this could and should be somehow be fixed by adding DWARF info that
> > certain callee-saved registers (= the function parameter values) were
> > overwritten. The corrected backtrace could look something like this:
> 
> That can be arranged by emitting those .cfi_undefined directives...
>  
> > #2  0x00000000004011d2 in baz (a=42, b=43, c=44, d=<optimised out>,
> > e=<optimised out>, f=<optimised out>, g=48, h=49) at /tmp/1.c:38
> 
> ... but really will not help users to debug/fix their code.
> 

It seems that the reason for <optimized out> is ultimately -Og, not this patch.
See Bug 78685. When compiling and debugging your program with -O0 instead,
there is not a single <optimized out>.


More information about the Gcc-bugs mailing list