http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53927
--- Comment #8 from Tom Tromey <tromey at gcc dot gnu.org> 2013-02-01 18:22:21 UTC --- > Yes, but you can do something useful even with this value of > DW_AT_static_link, albeit not exactly what DWARF means. Regardless, I think GCC should emit correct DWARF. > Indeed, that's why in AdaCore's version of the compiler, we always > generate DW_AT_static_link at -O0, and we even force the static > chain onto the stack in this case (as there are no location lists at > -O0). I think this would be a nice addition.