The test case from bug 40012 still fails in current mainline @149059 in 32-bit mode:
--- cut --- struct list_s { struct list_s* next; }; typedef struct list_s list; void f1(void*, list*); int f0(void* a, void* b, void* c, list* d) { list* problem; for(problem = d; problem; problem = problem->next) { int variable = 0; f1(c, problem); } return (0); } int main() { list a3 = { 0 }; f0(0, 0, 0, &a3); return 0; } void f1(void*a, list*b) { } --- cut --- gcc-svn-install-149059/bin/gcc -g gcc-pr40012-test.c -m32 gdb -q a.out (gdb) b main Breakpoint 1 at 0x80483d9: file gcc-pr40012-test.c, line 24. (gdb) r Breakpoint 1, main () at gcc-pr40012-test.c:24 24 list a3 = { 0 }; (gdb) n 25 f0(0, 0, 0, &a3); (gdb) p &a3 $1 = (list *) 0xffffccb4 (gdb) s f0 (a=0x0, b=0x0, c=0x0, d=0xffffcc8c) at gcc-pr40012-test.c:15 15 for(problem = d; problem; problem = problem->next) { Note mismatch between where GDB thinks &a3 is and the actual address. [AFAICT, this is currently causing 300+ failures in the GDB test suite.] -- Summary: [4.5 regression] Bad debug info for local variables on i386. Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: debug AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: ppluzhnikov at google dot com GCC build triplet: x86_64-unknown-linux-gnu GCC host triplet: x86_64-unknown-linux-gnu GCC target triplet: x86_64-unknown-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40596