public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/45939] New: negative location ranges generated
@ 2010-10-08 10:50 krebbel at gcc dot gnu.org
  2010-10-08 10:53 ` [Bug debug/45939] " krebbel at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: krebbel at gcc dot gnu.org @ 2010-10-08 10:50 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45939

           Summary: negative location ranges generated
           Product: gcc
           Version: 4.5.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: krebbel@gcc.gnu.org


Created attachment 21996
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=21996
Testcase

When compiling the testcase with -O2 -g a negative location range for a
variable is generated:

    00000371 0000000000000174 0000000000000176 (DW_OP_breg10: 4)
    00000371 0000000000000176 0000000000000175 (DW_OP_fbreg: -412) [without
DW_AT_frame_base] (start > end)

        .8byte  .LVL20-.Ltext0  # Location list begin address (*.LLST13)
        .8byte  .LVL20-1-.Ltext0        # Location list end address (*.LLST13)
        .2byte  0x3     # Location expression size
        .byte   0x91    # DW_OP_fbreg

The problem seem to arise from call related var_location note to be mixed with
non call related. 209r.vartrack:

(call_insn 150 580 583 20 wrongvainfo.c:31 (parallel [
            (call (mem:QI (reg/v/f:DI 6 %r6 [orig:120 getRegUsage ] [120]) [0
S1 A8])
                (const_int 0 [0x0]))
            (clobber (reg:DI 14 %r14))
        ]) 546 {*basr} (expr_list:REG_DEAD (reg:DI 4 %r4)
        (expr_list:REG_DEAD (reg:DI 3 %r3)
            (expr_list:REG_DEAD (reg:DI 2 %r2)
                (nil))))
    (expr_list:REG_DEP_TRUE (use (reg:DI 4 %r4))
        (expr_list:REG_DEP_TRUE (use (reg:DI 3 %r3))
            (expr_list:REG_DEP_TRUE (use (reg:DI 2 %r2))
                (nil)))))

(note 583 150 582 20 (var_location r (mem/c:SI (plus:DI (reg/f:DI 32 %ap)
        (const_int -412 [0xfffffffffffffe64])) [14 %sfp+-252 S4 A32]))
NOTE_INSN_VAR_LOCATION)

(note/c 582 583 581 20 (var_location instr (nil)) NOTE_INSN_VAR_LOCATION)

(note/c 581 582 584 20 (var_location r (reg:SI 14 %r14))
NOTE_INSN_VAR_LOCATION)


For note 582 the LVL20-1 label is being generated while note 583 belongs to
label LVL20. That makes the location range of note 583 to be LVL20...LVL20-1.


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

* [Bug debug/45939] negative location ranges generated
  2010-10-08 10:50 [Bug debug/45939] New: negative location ranges generated krebbel at gcc dot gnu.org
@ 2010-10-08 10:53 ` krebbel at gcc dot gnu.org
  2010-10-09  5:25 ` krebbel at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: krebbel at gcc dot gnu.org @ 2010-10-08 10:53 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45939

--- Comment #2 from Andreas Krebbel <krebbel at gcc dot gnu.org> 2010-10-08 10:53:41 UTC ---
The problem could not be reproduced with head. On head the var_location note in
question is never been generated. I was not able to figure out which change
caused this.

209r.vartrack:

(call_insn 157 155 523 14 (parallel [
            (call (mem:QI (reg/v/f:DI 6 %r6 [orig:133 getRegUsage ] [133]) [0
S1 A8])
                (const_int 0 [0]))
            (clobber (reg:DI 14 %r14))
        ]) wrongvainfo.c:31 548 {*basr}
     (expr_list:REG_DEAD (reg:DI 4 %r4)
        (expr_list:REG_DEAD (reg:DI 3 %r3)
            (expr_list:REG_DEAD (reg:DI 2 %r2)
                (nil))))
    (expr_list:REG_DEP_TRUE (use (reg:DI 4 %r4))
        (expr_list:REG_DEP_TRUE (use (reg:DI 3 %r3))
            (expr_list:REG_DEP_TRUE (use (reg:DI 2 %r2))
                (nil)))))

(note/c 523 157 522 14 (var_location instr (nil)) NOTE_INSN_VAR_LOCATION)

(note/c 522 523 524 14 (var_location r (reg:SI 12 %r12 [orig:98 D.2154 ] [98]))
NOTE_INSN_VAR_LOCATION)


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

* [Bug debug/45939] negative location ranges generated
  2010-10-08 10:50 [Bug debug/45939] New: negative location ranges generated krebbel at gcc dot gnu.org
  2010-10-08 10:53 ` [Bug debug/45939] " krebbel at gcc dot gnu.org
@ 2010-10-09  5:25 ` krebbel at gcc dot gnu.org
  2010-10-13 14:44 ` [Bug debug/45939] Wrong debug info: Negative location range generated krebbel at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: krebbel at gcc dot gnu.org @ 2010-10-09  5:25 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45939

Andreas Krebbel <krebbel at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-debug
             Target|                            |s390x-ibm-linux
               Host|                            |s390x-ibm-linux
   Target Milestone|---                         |4.5.2
              Build|                            |s390x-ibm-linux


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

* [Bug debug/45939] Wrong debug info: Negative location range generated
  2010-10-08 10:50 [Bug debug/45939] New: negative location ranges generated krebbel at gcc dot gnu.org
  2010-10-08 10:53 ` [Bug debug/45939] " krebbel at gcc dot gnu.org
  2010-10-09  5:25 ` krebbel at gcc dot gnu.org
@ 2010-10-13 14:44 ` krebbel at gcc dot gnu.org
  2010-10-13 14:56 ` jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: krebbel at gcc dot gnu.org @ 2010-10-13 14:44 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45939

Andreas Krebbel <krebbel at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2
           Severity|normal                      |major

--- Comment #3 from Andreas Krebbel <krebbel at gcc dot gnu.org> 2010-10-13 14:43:25 UTC ---
Due to that problem we see fails in the Valgrind testsuite. These should get
fixed before we integrate the S/390 Valgrind port.


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

* [Bug debug/45939] Wrong debug info: Negative location range generated
  2010-10-08 10:50 [Bug debug/45939] New: negative location ranges generated krebbel at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2010-10-13 14:44 ` [Bug debug/45939] Wrong debug info: Negative location range generated krebbel at gcc dot gnu.org
@ 2010-10-13 14:56 ` jakub at gcc dot gnu.org
  2010-11-06  6:29 ` krebbel at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2010-10-13 14:56 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45939

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-10-13 14:56:08 UTC ---
The patch looks ok to me, can you please post to gcc-patches?


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

* [Bug debug/45939] Wrong debug info: Negative location range generated
  2010-10-08 10:50 [Bug debug/45939] New: negative location ranges generated krebbel at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2010-10-13 14:56 ` jakub at gcc dot gnu.org
@ 2010-11-06  6:29 ` krebbel at gcc dot gnu.org
  2010-11-06  6:31 ` krebbel at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: krebbel at gcc dot gnu.org @ 2010-11-06  6:29 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45939

--- Comment #5 from Andreas Krebbel <krebbel at gcc dot gnu.org> 2010-11-06 06:29:02 UTC ---
Author: krebbel
Date: Sat Nov  6 06:28:59 2010
New Revision: 166395

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=166395
Log:
2010-11-06  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

    PR debug/45939
    * var-tracking.c (emit_note_insn_var_location): Make sure that
    call related var location notes come before the normal ones.


Modified:
    branches/gcc-4_5-branch/gcc/ChangeLog
    branches/gcc-4_5-branch/gcc/var-tracking.c


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

* [Bug debug/45939] Wrong debug info: Negative location range generated
  2010-10-08 10:50 [Bug debug/45939] New: negative location ranges generated krebbel at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2010-11-06  6:29 ` krebbel at gcc dot gnu.org
@ 2010-11-06  6:31 ` krebbel at gcc dot gnu.org
  2010-11-10 14:01 ` jakub at gcc dot gnu.org
  2010-11-17  5:42 ` aoliva at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: krebbel at gcc dot gnu.org @ 2010-11-06  6:31 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45939

--- Comment #6 from Andreas Krebbel <krebbel at gcc dot gnu.org> 2010-11-06 06:31:04 UTC ---
Author: krebbel
Date: Sat Nov  6 06:31:02 2010
New Revision: 166396

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=166396
Log:
2010-11-06  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

    PR debug/45939
    * var-tracking.c (emit_note_insn_var_location): Make sure that
    call related var location notes come before the normal ones.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/var-tracking.c


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

* [Bug debug/45939] Wrong debug info: Negative location range generated
  2010-10-08 10:50 [Bug debug/45939] New: negative location ranges generated krebbel at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2010-11-06  6:31 ` krebbel at gcc dot gnu.org
@ 2010-11-10 14:01 ` jakub at gcc dot gnu.org
  2010-11-17  5:42 ` aoliva at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2010-11-10 14:01 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45939

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rguenth at gcc dot gnu.org

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-11-10 14:00:38 UTC ---
*** Bug 46389 has been marked as a duplicate of this bug. ***


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

* [Bug debug/45939] Wrong debug info: Negative location range generated
  2010-10-08 10:50 [Bug debug/45939] New: negative location ranges generated krebbel at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2010-11-10 14:01 ` jakub at gcc dot gnu.org
@ 2010-11-17  5:42 ` aoliva at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: aoliva at gcc dot gnu.org @ 2010-11-17  5:42 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45939

Alexandre Oliva <aoliva at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED
         AssignedTo|unassigned at gcc dot       |krebbel at gcc dot gnu.org
                   |gnu.org                     |

--- Comment #8 from Alexandre Oliva <aoliva at gcc dot gnu.org> 2010-11-17 05:39:33 UTC ---
It looks like this was fixed by Andreas' patch, closing.


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

end of thread, other threads:[~2010-11-17  5:40 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-08 10:50 [Bug debug/45939] New: negative location ranges generated krebbel at gcc dot gnu.org
2010-10-08 10:53 ` [Bug debug/45939] " krebbel at gcc dot gnu.org
2010-10-09  5:25 ` krebbel at gcc dot gnu.org
2010-10-13 14:44 ` [Bug debug/45939] Wrong debug info: Negative location range generated krebbel at gcc dot gnu.org
2010-10-13 14:56 ` jakub at gcc dot gnu.org
2010-11-06  6:29 ` krebbel at gcc dot gnu.org
2010-11-06  6:31 ` krebbel at gcc dot gnu.org
2010-11-10 14:01 ` jakub at gcc dot gnu.org
2010-11-17  5:42 ` aoliva at gcc dot gnu.org

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).