public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/53948] New: [4.8 Regression] Assignment line missing for -O0 -g
@ 2012-07-13  8:51 jan.kratochvil at redhat dot com
  2012-07-13  9:12 ` [Bug debug/53948] " rguenth at gcc dot gnu.org
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: jan.kratochvil at redhat dot com @ 2012-07-13  8:51 UTC (permalink / raw)
  To: gcc-bugs

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: unassigned@gcc.gnu.org
        ReportedBy: jan.kratochvil@redhat.com
                CC: aoliva@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'.


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2013-02-08 20:07 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-13  8:51 [Bug debug/53948] New: [4.8 Regression] Assignment line missing for -O0 -g jan.kratochvil at redhat dot com
2012-07-13  9:12 ` [Bug debug/53948] " rguenth at gcc dot gnu.org
2012-07-16 19:37 ` jakub at gcc dot gnu.org
2012-07-16 19:49 ` steven at gcc dot gnu.org
2012-07-16 20:23 ` steven at gcc dot gnu.org
2012-07-16 21:58 ` steven at gcc dot gnu.org
2012-09-19 13:45 ` rguenth at gcc dot gnu.org
2013-02-07 20:05 ` law at redhat dot com
2013-02-07 20:24 ` stevenb.gcc at gmail dot com
2013-02-07 20:41 ` jakub at gcc dot gnu.org
2013-02-07 20:47 ` law at redhat dot com
2013-02-08  8:28 ` rguenth at gcc dot gnu.org
2013-02-08 13:20 ` law at redhat dot com
2013-02-08 13:46 ` jakub at gcc dot gnu.org
2013-02-08 20:04 ` law at gcc dot gnu.org
2013-02-08 20:05 ` law at redhat dot com
2013-02-08 20:07 ` law at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).