public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/43443] New: We should yank ASM_OPERANDS locs from var-tracking preserved cselib VALUEs
@ 2010-03-19 17:10 jakub at gcc dot gnu dot org
2010-03-19 17:12 ` [Bug debug/43443] " jakub at gcc dot gnu dot org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-03-19 17:10 UTC (permalink / raw)
To: gcc-bugs
__attribute__((noinline))
void bar (void)
{
asm volatile ("" : : : "memory");
}
int
main (void)
{
int i = 6;
bar ();
i++;
asm ("" : "+r" (i));
i++;
return i;
}
on x86_64-linux -g -O2 has bogosity in VAR_LOCATION note:
(note 33 13 21 2 (var_location i (expr_list:REG_DEP_TRUE (plus:SI
(asm_operands:SI ("") ("=r") 0 [
(const_int 7 [0x7])
]
[
(asm_input:SI ("0") (null):0)
]
[] dm.c:16)
(const_int 1 [0x1]))
This is because the register that was set by this non-volatile asm was
clobbered and ASM_OPERANDS definitely is not something we can emit into the
debug info.
And, if it wasn't there, vt_expand_loc could see that this doesn't lead to
useful location and try another one, in particular the one provided by
reverse_op stuff. With the patch I'm going to attach on this testcase we end
up with:
(note 33 13 21 2 (var_location i (expr_list:REG_DEP_TRUE (reg:SI 0 ax [63])
note instead, with assembly diff:
@@ -70,6 +70,10 @@ main:
.byte0x70# DW_OP_breg0
.sleb128 1
.byte0x9f# DW_OP_stack_value
+.quad.LVL3-.Ltext0# Location list begin address (*.LLST0)
+.quad.LFE1-.Ltext0# Location list end address (*.LLST0)
+.value0x1# Location expression size
+.byte0x50# DW_OP_reg0
.quad0x0# Location list terminator begin (*.LLST0)
.quad0x0# Location list terminator end (*.LLST0)
.section.debug_info
--
Summary: We should yank ASM_OPERANDS locs from var-tracking
preserved cselib VALUEs
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: debug
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jakub at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43443
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug debug/43443] We should yank ASM_OPERANDS locs from var-tracking preserved cselib VALUEs
2010-03-19 17:10 [Bug debug/43443] New: We should yank ASM_OPERANDS locs from var-tracking preserved cselib VALUEs jakub at gcc dot gnu dot org
@ 2010-03-19 17:12 ` jakub at gcc dot gnu dot org
2010-03-22 10:27 ` jakub at gcc dot gnu dot org
2010-03-22 10:50 ` jakub at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-03-19 17:12 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from jakub at gcc dot gnu dot org 2010-03-19 17:12 -------
Created an attachment (id=20143)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20143&action=view)
gcc45-pr43443.patch
Fix.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |jakub at gcc dot gnu dot org
|dot org |
Status|UNCONFIRMED |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43443
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug debug/43443] We should yank ASM_OPERANDS locs from var-tracking preserved cselib VALUEs
2010-03-19 17:10 [Bug debug/43443] New: We should yank ASM_OPERANDS locs from var-tracking preserved cselib VALUEs jakub at gcc dot gnu dot org
2010-03-19 17:12 ` [Bug debug/43443] " jakub at gcc dot gnu dot org
@ 2010-03-22 10:27 ` jakub at gcc dot gnu dot org
2010-03-22 10:50 ` jakub at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-03-22 10:27 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from jakub at gcc dot gnu dot org 2010-03-22 10:26 -------
Subject: Bug 43443
Author: jakub
Date: Mon Mar 22 10:26:33 2010
New Revision: 157620
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=157620
Log:
PR debug/43443
* var-tracking.c (add_cselib_value_chains): Remove ASM_OPERANDS
locs from preserved VALUEs.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/var-tracking.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43443
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug debug/43443] We should yank ASM_OPERANDS locs from var-tracking preserved cselib VALUEs
2010-03-19 17:10 [Bug debug/43443] New: We should yank ASM_OPERANDS locs from var-tracking preserved cselib VALUEs jakub at gcc dot gnu dot org
2010-03-19 17:12 ` [Bug debug/43443] " jakub at gcc dot gnu dot org
2010-03-22 10:27 ` jakub at gcc dot gnu dot org
@ 2010-03-22 10:50 ` jakub at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-03-22 10:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from jakub at gcc dot gnu dot org 2010-03-22 10:49 -------
Fixed.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43443
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-03-22 10:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-19 17:10 [Bug debug/43443] New: We should yank ASM_OPERANDS locs from var-tracking preserved cselib VALUEs jakub at gcc dot gnu dot org
2010-03-19 17:12 ` [Bug debug/43443] " jakub at gcc dot gnu dot org
2010-03-22 10:27 ` jakub at gcc dot gnu dot org
2010-03-22 10:50 ` jakub at gcc dot gnu dot 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).