https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65997

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-05-04
            Summary|-mregparm=3 causes bad      |Bad DWARF debug info
                   |DWARF debug info            |
     Ever confirmed|0                           |1

--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> ---
Also happen on x86-64:

[hjl@gnu-6 gcc]$ cat /tmp/x.c
void
foo (void *b , unsigned int length)
{
  char *ptr = (char *)b;
  while (length--)
    *ptr++ = 0;
}
[hjl@gnu-6 gcc]$ /usr/gcc-5.1.1/bin/gcc   -O2 -g /tmp/x.c -c 
[hjl@gnu-6 gcc]$  readelf --debug-dump=loc x.o 
Contents of the .zdebug_loc section:

    Offset   Begin    End      Expression
    00000000 0000000000000000 000000000000000c (DW_OP_reg5 (rdi))
    00000013 000000000000000c 000000000000001f (DW_OP_GNU_entry_value:
(DW_OP_reg5 (rdi)); DW_OP_stack_value)
    00000029 <End of list>
    00000039 <End of list>
readelf: Warning: There are 40 unused bytes at the end of section .zdebug_loc

[hjl@gnu-6 gcc]$

Reply via email to