------- Comment #31 from jakub at gcc dot gnu dot org 2008-11-20 21:51 ------- AFAIK there are 2 bugs in DW_CFA_GNU_args_size handling left. One is that with -fdefer-pop DW_CFA_GNU_args_size will be wrong in some cases (either with -fasynchronous-unwind-tables if noreturn calls with different depth are crossjumped (I think #c13 in this PR is an example), or otherwise when relying on call's second argument. The other problem is that alloca with constant argument (possibly discovered during the optimizations) will be thought as normal stack adjustment and thus accounted for in DW_CFA_GNU_args_size computations, which is wrong. See PR37022.
If it would be possible with -fdefer-pop to put into CALL's second argument the actual cumulative stack difference instead of just the size of the arguments, I think the first problem could be solved (as long as crossjumping wouldn't merge CALLs with different second argument). For the second I'm afraid we'll need some way to mark the alloca stack adjustment, so that dwarf2out.c DW_CFA_GNU_args_size computation would ignore it. BTW, unless the asserts are reenabled again (they are currently disabled for these reasons), this isn't a regression, I don't think we ever emitted DW_CFA_GNU_args_size correctly in such cases. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36998