public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/41558] New: gfortran -O code excessive DW_OP_deref's
@ 2009-10-03 19:10 jan dot kratochvil at redhat dot com
2009-10-05 9:52 ` [Bug debug/41558] " jakub at gcc dot gnu dot org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: jan dot kratochvil at redhat dot com @ 2009-10-03 19:10 UTC (permalink / raw)
To: gcc-bugs
GNU Fortran (GCC) 4.5.0 20091003 (experimental)
subroutine f(s)
character*3 s
s = s
end
call f ('foo')
end
gdb -nx -ex 'b 3' -ex r -ex 'p s' ./file
->
Cannot access memory at address 0x6f6f66
<2><4a>: Abbrev Number: 3 (DW_TAG_formal_parameter)
<4b> DW_AT_name : s
<4f> DW_AT_type : <0x64>
<53> DW_AT_location : 4 byte block: 75 0 6 6 (DW_OP_breg5: 0;
DW_OP_deref; DW_OP_deref)
If I patch those two DW_OP_deref -> DW_OP_nop then GDB prints:
$1 = 'foo'
gfortran -o 1 1.f90 -Wall -g -O1
currently:
.LC0:
.ascii "foo"
...
movl $.LC0, %edi
...
.byte 0x4 # DW_AT_location
.byte 0x75 # DW_OP_breg5
.sleb128 0
.byte 0x6 # DW_OP_deref
.byte 0x6 # DW_OP_deref
--
Summary: gfortran -O code excessive DW_OP_deref's
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: debug
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jan dot kratochvil at redhat dot com
GCC target triplet: x86_64-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41558
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug debug/41558] gfortran -O code excessive DW_OP_deref's
2009-10-03 19:10 [Bug debug/41558] New: gfortran -O code excessive DW_OP_deref's jan dot kratochvil at redhat dot com
@ 2009-10-05 9:52 ` jakub at gcc dot gnu dot org
2009-10-05 19:51 ` jakub at gcc dot gnu dot org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-10-05 9:52 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from jakub at gcc dot gnu dot org 2009-10-05 09:52 -------
Created an attachment (id=18706)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18706&action=view)
gcc45-pr41558.patch
Patch I'm going to bootstrap/regtest.
BTW, gdb 7.0.50.20091005-cvs doesn't work with the guality.exp testcases well,
something broke in it recently. 6.8.91.20090917-1.fc12 works fine.
--
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=41558
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug debug/41558] gfortran -O code excessive DW_OP_deref's
2009-10-03 19:10 [Bug debug/41558] New: gfortran -O code excessive DW_OP_deref's jan dot kratochvil at redhat dot com
2009-10-05 9:52 ` [Bug debug/41558] " jakub at gcc dot gnu dot org
@ 2009-10-05 19:51 ` jakub at gcc dot gnu dot org
2009-10-06 15:28 ` jan dot kratochvil at redhat dot com
2009-10-12 19:09 ` jakub at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-10-05 19:51 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from jakub at gcc dot gnu dot org 2009-10-05 19:51 -------
Subject: Bug 41558
Author: jakub
Date: Mon Oct 5 19:50:57 2009
New Revision: 152467
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=152467
Log:
PR debug/41558
* dwarf2out.c (loc_by_reference): Removed.
(dw_loc_list_1): New function.
(dw_loc_list): Remove toplev argument, add want_address argument.
Don't look at decl_by_reference_p at all. Use dw_loc_list_1.
(loc_list_from_tree) <case VAR_DECL>: Pass want_address rather than
want_address == 2 to dw_loc_list. For successful dw_loc_list
set have_address to 1 only if want_address is not 0.
* gcc.dg/guality/guality.exp: Move gdb-test proc into...
* lib/gcc-gdb-test.exp: ... here. New file.
* gfortran.dg/guality/guality.exp: New file.
* gfortran.dg/guality/pr41558.f90: New test.
* gfortran.dg/guality/arg1.f90: New test.
Added:
trunk/gcc/testsuite/gfortran.dg/guality/
trunk/gcc/testsuite/gfortran.dg/guality/arg1.f90
trunk/gcc/testsuite/gfortran.dg/guality/guality.exp
trunk/gcc/testsuite/gfortran.dg/guality/pr41558.f90
trunk/gcc/testsuite/lib/gcc-gdb-test.exp
Modified:
trunk/gcc/ChangeLog
trunk/gcc/dwarf2out.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/guality/guality.exp
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41558
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug debug/41558] gfortran -O code excessive DW_OP_deref's
2009-10-03 19:10 [Bug debug/41558] New: gfortran -O code excessive DW_OP_deref's jan dot kratochvil at redhat dot com
2009-10-05 9:52 ` [Bug debug/41558] " jakub at gcc dot gnu dot org
2009-10-05 19:51 ` jakub at gcc dot gnu dot org
@ 2009-10-06 15:28 ` jan dot kratochvil at redhat dot com
2009-10-12 19:09 ` jakub at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: jan dot kratochvil at redhat dot com @ 2009-10-06 15:28 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from jan dot kratochvil at redhat dot com 2009-10-06 15:28 -------
(In reply to comment #1)
> BTW, gdb 7.0.50.20091005-cvs doesn't work with the guality.exp testcases well,
> something broke in it recently. 6.8.91.20090917-1.fc12 works fine.
There is an array with variable size: integer :: a(n), n
VLA support is still missing in FSF GDB, it is present in Archer (+Fedora)
branch archer-jankratochvil-vla:
http://sourceware.org/gdb/wiki/ArcherBranchManagement
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41558
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug debug/41558] gfortran -O code excessive DW_OP_deref's
2009-10-03 19:10 [Bug debug/41558] New: gfortran -O code excessive DW_OP_deref's jan dot kratochvil at redhat dot com
` (2 preceding siblings ...)
2009-10-06 15:28 ` jan dot kratochvil at redhat dot com
@ 2009-10-12 19:09 ` jakub at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-10-12 19:09 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from jakub at gcc dot gnu dot org 2009-10-12 19:09 -------
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=41558
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-10-12 19:09 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-03 19:10 [Bug debug/41558] New: gfortran -O code excessive DW_OP_deref's jan dot kratochvil at redhat dot com
2009-10-05 9:52 ` [Bug debug/41558] " jakub at gcc dot gnu dot org
2009-10-05 19:51 ` jakub at gcc dot gnu dot org
2009-10-06 15:28 ` jan dot kratochvil at redhat dot com
2009-10-12 19:09 ` 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).