public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/44610] New: VTA produces wrong variable location information
@ 2010-06-21 13:51 hariharans at picochip dot com
2010-06-21 13:55 ` [Bug debug/44610] " hariharans at picochip dot com
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: hariharans at picochip dot com @ 2010-06-21 13:51 UTC (permalink / raw)
To: gcc-bugs
If i compile the attached testcase for picochip under -O2, i get the following
location information for variable arg0 in main.
.ascii 16#61# 16#72# 16#67# 16#30# 16#0# ; arg0\0
.initByte 0x1
.initByte 0x2a
.unalignedInitLong 0x9e
.initByte 0xc
.initByte 0x5b
.initByte 0x93
.uleb128 0x2
.initByte 0x5b
.initByte 0x93
.uleb128 0x2
.initByte 0x5b
.initByte 0x93
.uleb128 0x2
.initByte 0x5b
.initByte 0x93
.uleb128 0x2
.uleb128 0xc
.unalignedInitLong _picoMark_Ldebug_ranges0+0xc
.uleb128 0xa
which my dwarflib reader translates to mean
<0x42f> (19) Lexical Block:
Address Ranges: [0x18, 0x8d) [0x94, 0x99)
<0x434> (20) Data:
Name: arg0
Type: <0xe0>
Is External: false
Location: DW_OP_reg11 DW_OP_piece: 2 DW_OP_reg11 DW_OP_piece: 2
DW_OP_reg11 DW_OP_piece: 2 DW_OP_reg11 DW_OP_piece: 2
R11 obviously does not contain all 4 piece os this 8-byte variable (a register
is 16-bit in picochip). I have tried to see if this was bug 43982, but the
mainline as of 20Jun with fix for that bug still reproduces this problem.
The problem with this is that it doesn't actually say variable value is not
present, which is generally okay with -O2. It just gives wrong value silently!
Can you have a look at this, please?
I will attach the source file and the assembly. Please ask me if you need any
other information.
--
Summary: VTA produces wrong variable location information
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: debug
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: hariharans at picochip dot com
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: picochip-unknown-none
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44610
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug debug/44610] VTA produces wrong variable location information
2010-06-21 13:51 [Bug debug/44610] New: VTA produces wrong variable location information hariharans at picochip dot com
@ 2010-06-21 13:55 ` hariharans at picochip dot com
2010-06-21 13:56 ` hariharans at picochip dot com
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: hariharans at picochip dot com @ 2010-06-21 13:55 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from hariharans at picochip dot com 2010-06-21 13:55 -------
Created an attachment (id=20961)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20961&action=view)
The test sourcecode
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44610
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug debug/44610] VTA produces wrong variable location information
2010-06-21 13:51 [Bug debug/44610] New: VTA produces wrong variable location information hariharans at picochip dot com
2010-06-21 13:55 ` [Bug debug/44610] " hariharans at picochip dot com
@ 2010-06-21 13:56 ` hariharans at picochip dot com
2010-06-21 13:59 ` hariharans at picochip dot com
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: hariharans at picochip dot com @ 2010-06-21 13:56 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from hariharans at picochip dot com 2010-06-21 13:56 -------
Created an attachment (id=20962)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20962&action=view)
The test assembly
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44610
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug debug/44610] VTA produces wrong variable location information
2010-06-21 13:51 [Bug debug/44610] New: VTA produces wrong variable location information hariharans at picochip dot com
2010-06-21 13:55 ` [Bug debug/44610] " hariharans at picochip dot com
2010-06-21 13:56 ` hariharans at picochip dot com
@ 2010-06-21 13:59 ` hariharans at picochip dot com
2010-06-23 4:30 ` aoliva at gcc dot gnu dot org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: hariharans at picochip dot com @ 2010-06-21 13:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from hariharans at picochip dot com 2010-06-21 13:59 -------
In my first comment, bug 43982 should have been bug 43983
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44610
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug debug/44610] VTA produces wrong variable location information
2010-06-21 13:51 [Bug debug/44610] New: VTA produces wrong variable location information hariharans at picochip dot com
` (2 preceding siblings ...)
2010-06-21 13:59 ` hariharans at picochip dot com
@ 2010-06-23 4:30 ` aoliva at gcc dot gnu dot org
2010-06-23 4:35 ` aoliva at gcc dot gnu dot org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: aoliva at gcc dot gnu dot org @ 2010-06-23 4:30 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from aoliva at gcc dot gnu dot org 2010-06-23 04:30 -------
Mine
--
aoliva at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |aoliva at gcc dot gnu dot
|dot org |org
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2010-06-23 04:30:09
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44610
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug debug/44610] VTA produces wrong variable location information
2010-06-21 13:51 [Bug debug/44610] New: VTA produces wrong variable location information hariharans at picochip dot com
` (3 preceding siblings ...)
2010-06-23 4:30 ` aoliva at gcc dot gnu dot org
@ 2010-06-23 4:35 ` aoliva at gcc dot gnu dot org
2010-06-25 21:12 ` aoliva at gcc dot gnu dot org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: aoliva at gcc dot gnu dot org @ 2010-06-23 4:35 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from aoliva at gcc dot gnu dot org 2010-06-23 04:35 -------
Created an attachment (id=20984)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20984&action=view)
Patch that fixes the problem
The MEMs for each HImode in the DImode args all have NULL MEM_OFFSET (we indeed
don have a constant offset within the loop, for it varies), but when we
delegitimize those addresses during var-tracking, we assume no MEM_OFFSET means
zero MEM_OFFSET, which maps all MEMs to the same VALUE. The assumption turns
out to be wrong. We can't delegitimize a MEM to the base address when it may
be offset by an unknown amount. Testing the patch now.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44610
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug debug/44610] VTA produces wrong variable location information
2010-06-21 13:51 [Bug debug/44610] New: VTA produces wrong variable location information hariharans at picochip dot com
` (5 preceding siblings ...)
2010-06-25 21:12 ` aoliva at gcc dot gnu dot org
@ 2010-06-25 21:12 ` aoliva at gcc dot gnu dot org
2010-06-25 21:14 ` aoliva at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: aoliva at gcc dot gnu dot org @ 2010-06-25 21:12 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from aoliva at gcc dot gnu dot org 2010-06-25 21:11 -------
Subject: Bug 44610
Author: aoliva
Date: Fri Jun 25 21:11:32 2010
New Revision: 161413
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=161413
Log:
PR debug/44610
* simplify-rtx.c (delegitimize_mem_from_attrs): Don't use a base
address if the offset is unknown.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/simplify-rtx.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44610
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug debug/44610] VTA produces wrong variable location information
2010-06-21 13:51 [Bug debug/44610] New: VTA produces wrong variable location information hariharans at picochip dot com
` (4 preceding siblings ...)
2010-06-23 4:35 ` aoliva at gcc dot gnu dot org
@ 2010-06-25 21:12 ` aoliva at gcc dot gnu dot org
2010-06-25 21:12 ` aoliva at gcc dot gnu dot org
2010-06-25 21:14 ` aoliva at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: aoliva at gcc dot gnu dot org @ 2010-06-25 21:12 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from aoliva at gcc dot gnu dot org 2010-06-25 21:12 -------
Subject: Bug 44610
Author: aoliva
Date: Fri Jun 25 21:11:56 2010
New Revision: 161414
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=161414
Log:
PR debug/44610
* simplify-rtx.c (delegitimize_mem_from_attrs): Don't use a base
address if the offset is unknown.
Modified:
branches/gcc-4_5-branch/gcc/ChangeLog
branches/gcc-4_5-branch/gcc/simplify-rtx.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44610
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug debug/44610] VTA produces wrong variable location information
2010-06-21 13:51 [Bug debug/44610] New: VTA produces wrong variable location information hariharans at picochip dot com
` (6 preceding siblings ...)
2010-06-25 21:12 ` aoliva at gcc dot gnu dot org
@ 2010-06-25 21:14 ` aoliva at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: aoliva at gcc dot gnu dot org @ 2010-06-25 21:14 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from aoliva at gcc dot gnu dot org 2010-06-25 21:13 -------
Fixed
--
aoliva at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44610
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2010-06-25 21:14 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-21 13:51 [Bug debug/44610] New: VTA produces wrong variable location information hariharans at picochip dot com
2010-06-21 13:55 ` [Bug debug/44610] " hariharans at picochip dot com
2010-06-21 13:56 ` hariharans at picochip dot com
2010-06-21 13:59 ` hariharans at picochip dot com
2010-06-23 4:30 ` aoliva at gcc dot gnu dot org
2010-06-23 4:35 ` aoliva at gcc dot gnu dot org
2010-06-25 21:12 ` aoliva at gcc dot gnu dot org
2010-06-25 21:12 ` aoliva at gcc dot gnu dot org
2010-06-25 21:14 ` aoliva 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).