http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49032

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-05-19 
17:07:35 UTC ---
Created attachment 24293
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24293
gcc47-pr49032.patch

Untested fix.  Works on this testcase, as well as when s is actually forced to
be output (e.g. through inline asm).  I'm not a stabs user (are there any left
anyway?), so don't know whether it doesn't decrease debug info quality (if we
can speak about debug info quality in stabs case), but from I understand at
least the global_decl debug hooks are called at least by C/C++ FEs after
cgraph_finalize_compilation_unit has been called and thus IMHO the patch should
only change anything when the vars aren't output.
Guess one could put there instead gcc_unreachable (); instead of return NULL;
and see how often it triggers during -gstabs bootstrap.

Reply via email to