http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53948
Bug #: 53948 Summary: [4.8 Regression] Assignment line missing for -O0 -g Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: debug AssignedTo: unassig...@gcc.gnu.org ReportedBy: jan.kratoch...@redhat.com CC: aol...@gcc.gnu.org Target: x86_64-unknown-linux-gnu Nothing serious but it broke gdb.base/store.exp and I believe -O0 -g should not "optimize out" source statements. int f (register int a, register int b) { register int x = b, y = a; return x + y; } gcc -g PASS: gcc (GCC) 4.7.2 20120713 (prerelease) 7: 89 f8 mov %edi,%eax 9: 89 f2 mov %esi,%edx register int x = b, y = a; b: 41 89 d4 mov %edx,%r12d e: 89 c3 mov %eax,%ebx return x + y; } 10: 41 8d 04 1c lea (%r12,%rbx,1),%eax FAIL: gcc (GCC) 4.8.0 20120713 (experimental) 7: 89 fb mov %edi,%ebx 9: 41 89 f4 mov %esi,%r12d register int x = b, y = a; return x + y; } c: 41 8d 04 1c lea (%r12,%rbx,1),%eax GDB no longer stops on the 'register int x = b, y = a;' line during 'step'. .debug_info is correct in both cases. I can update the GDB testsuite but still I believe 'int var = val;' source line should have its instruction during -O0 -g, even if it is just a 'nop'.