int foo (int parm) { int var = 0; int bar (void) { return parm + var; } parm++; var++; return bar (); } int main (void) { return foo (4) - 6; } at -O0 -g this was perfectly debuggable in 4.3, but doesn't know anything about parm or var, neither in the outer nor inner function.
Subject: Bug 37726 Author: jakub Date: Fri Oct 3 18:55:39 2008 New Revision: 140857 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=140857 Log: PR debug/37726 * gimplify.c (declare_vars): Use gimple_bind_block instead of gimple_block. * gcc.dg/debug/dwarf2/pr37726.c: New test. Added: trunk/gcc/testsuite/gcc.dg/debug/dwarf2/pr37726.c Modified: trunk/gcc/ChangeLog trunk/gcc/gimplify.c trunk/gcc/testsuite/ChangeLog
Fixed.
This test does not work for darwin for some reason, I have not looked why though, I bet it is due to the way dwarf2 is outputted there.