public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/35154] New: Unable to reference symbols in Fortran COMMON due to .stabs format
@ 2008-02-10 11:35 george at gly dot bris dot ac dot uk
2008-02-14 9:10 ` [Bug fortran/35154] " george at gcc dot gnu dot org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: george at gly dot bris dot ac dot uk @ 2008-02-10 11:35 UTC (permalink / raw)
To: gcc-bugs
Problem is fixed with approved (but uncommitted) patch at
http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00286.html
Arises on different systems lacking either: 1) loader ability to process
external (i.e. non-.TEXT) SYMBOL+offset in .stabs; or 2) gdb ability to process
same. Darwin is one; FX Coudert's gfortran
testing system is another (unknown type).
To replicate, see below.
----------------
#cat simtest.f
common i,j
common /label/l,m
i = 1
j = 2
k = 3
l = 4
m = 5
call sub
end
subroutine sub
common /label/l,m
logical first
save n
data first /.true./
if (first) then
n = 0
first = .false.
endif
n = n + 1
l = l + 1
end
#
#gfortran -v -g -o simtest simtest.f
Driving: gfortran -mmacosx-version-min=10.4 -v -g -o simtest simtest.f
-lgfortranbegin -lgfortran -shared-libgcc
Using built-in specs.
Target: powerpc-apple-darwin8.8.0
Configured with: ../gcc-trunk/gcc/configure --enable-languages=c,fortran
Thread model: posix
gcc version 4.3.0 20080204 (experimental) (GCC)
COLLECT_GCC_OPTIONS='-mmacosx-version-min=10.4' '-v' '-g' '-o' 'simtest'
'-shared-libgcc'
/usr/local/libexec/gcc/powerpc-apple-darwin8.8.0/4.3.0/f951 simtest.f
-ffixed-form -feliminate-unused-debug-symbols -fPIC -quiet -dumpbase simtest.f
-mmacosx-version-min=10.4 -auxbase simtest -g -version -fintrinsic-modules-path
/usr/local/lib/gcc/powerpc-apple-darwin8.8.0/4.3.0/finclude -o
/var/tmp//cc6Ld1Df.s
GNU F95 (GCC) version 4.3.0 20080204 (experimental) (powerpc-apple-darwin8.8.0)
compiled by GNU C version 4.3.0 20080204 (experimental), GMP version
4.2.2, MPFR version 2.3.0-p3.
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
COLLECT_GCC_OPTIONS='-mmacosx-version-min=10.4' '-v' '-g' '-o' 'simtest'
'-shared-libgcc'
as -arch ppc -o /var/tmp//ccILL0ce.o /var/tmp//cc6Ld1Df.s
COMPILER_PATH=/usr/local/libexec/gcc/powerpc-apple-darwin8.8.0/4.3.0/:/usr/local/libexec/gcc/powerpc-apple-darwin8.8.0/4.3.0/:/usr/local/libexec/gcc/powerpc-apple-darwin8.8.0/:/usr/local/lib/gcc/powerpc-apple-darwin8.8.0/4.3.0/:/usr/local/lib/gcc/powerpc-apple-darwin8.8.0/
LIBRARY_PATH=/usr/local/lib/gcc/powerpc-apple-darwin8.8.0/4.3.0/:/usr/local/lib/gcc/powerpc-apple-darwin8.8.0/4.3.0/../../../:/usr/lib/
COLLECT_GCC_OPTIONS='-mmacosx-version-min=10.4' '-v' '-g' '-o' 'simtest'
'-shared-libgcc'
/usr/local/libexec/gcc/powerpc-apple-darwin8.8.0/4.3.0/collect2 -dynamic -arch
ppc -macosx_version_min 10.4 -multiply_defined suppress
-weak_reference_mismatches non-weak -o simtest -lcrt1.o
/usr/local/lib/gcc/powerpc-apple-darwin8.8.0/4.3.0/crt3.o
-L/usr/local/lib/gcc/powerpc-apple-darwin8.8.0/4.3.0
-L/usr/local/lib/gcc/powerpc-apple-darwin8.8.0/4.3.0/../../..
/var/tmp//ccILL0ce.o -lgfortranbegin -lgfortran -lgcc_s.10.4 -lgcc
-lSystemStubs -lSystem
COLLECT_GCC_OPTIONS='-mmacosx-version-min=10.4' '-v' '-g' '-o' 'simtest'
'-shared-libgcc'
#gdb simtest
GNU gdb 6.3.50-20050815 (Apple version gdb-573) (Fri Oct 20 15:54:33 GMT 2006)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "powerpc-apple-darwin"...Reading symbols for shared
libraries .... done
(gdb) l MAIN__
1 common i,j
2 common /label/l,m
3 i = 1
4 j = 2
5 k = 3
6 l = 4
7 m = 5
8 call sub
9 end
10 subroutine sub
(gdb) break 8
Breakpoint 1 at 0x2c28: file simtest.f, line 8.
(gdb) run
Starting program: /Users/george/f77/simtest
Reading symbols for shared libraries ..+. done
Breakpoint 1, MAIN__ () at simtest.f:8
8 call sub
(gdb) p i
Address of symbol "i" is unknown.
(gdb) p j
No symbol "j" in current context.
(gdb) p k
$1 = 3
Current language: auto; currently fortran
(gdb) p l
Address of symbol "l" is unknown.
(gdb) p m
No symbol "m" in current context.
(gdb) quit
The program is running. Exit anyway? (y or n) y
#
-------------------
--
Summary: Unable to reference symbols in Fortran COMMON due to
.stabs format
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: george at gly dot bris dot ac dot uk
GCC build triplet: powerpc-apple-darwin8.8.0
GCC host triplet: powerpc-apple-darwin8.8.0 (and others)
GCC target triplet: powerpc-apple-darwin8.8.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35154
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/35154] Unable to reference symbols in Fortran COMMON due to .stabs format
2008-02-10 11:35 [Bug fortran/35154] New: Unable to reference symbols in Fortran COMMON due to .stabs format george at gly dot bris dot ac dot uk
@ 2008-02-14 9:10 ` george at gcc dot gnu dot org
2008-04-02 8:02 ` george at gcc dot gnu dot org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: george at gcc dot gnu dot org @ 2008-02-14 9:10 UTC (permalink / raw)
To: gcc-bugs
--
george at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |george at gcc dot gnu dot
|dot org |org
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2008-02-14 09:09:32
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35154
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/35154] Unable to reference symbols in Fortran COMMON due to .stabs format
2008-02-10 11:35 [Bug fortran/35154] New: Unable to reference symbols in Fortran COMMON due to .stabs format george at gly dot bris dot ac dot uk
2008-02-14 9:10 ` [Bug fortran/35154] " george at gcc dot gnu dot org
@ 2008-04-02 8:02 ` george at gcc dot gnu dot org
2008-04-19 6:50 ` jvdelisle at gcc dot gnu dot org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: george at gcc dot gnu dot org @ 2008-04-02 8:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from george at gcc dot gnu dot org 2008-04-02 08:01 -------
Fixed in rev 133800 1 April 2008
--
george at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35154
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/35154] Unable to reference symbols in Fortran COMMON due to .stabs format
2008-02-10 11:35 [Bug fortran/35154] New: Unable to reference symbols in Fortran COMMON due to .stabs format george at gly dot bris dot ac dot uk
2008-02-14 9:10 ` [Bug fortran/35154] " george at gcc dot gnu dot org
2008-04-02 8:02 ` george at gcc dot gnu dot org
@ 2008-04-19 6:50 ` jvdelisle at gcc dot gnu dot org
2008-04-26 9:47 ` george at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2008-04-19 6:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from jvdelisle at gcc dot gnu dot org 2008-04-19 06:49 -------
Reopening this PR after reverting the patch until the problem can be sorted
out.
See PR35892 which caused by the patch to this one.
--
jvdelisle at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35154
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/35154] Unable to reference symbols in Fortran COMMON due to .stabs format
2008-02-10 11:35 [Bug fortran/35154] New: Unable to reference symbols in Fortran COMMON due to .stabs format george at gly dot bris dot ac dot uk
` (2 preceding siblings ...)
2008-04-19 6:50 ` jvdelisle at gcc dot gnu dot org
@ 2008-04-26 9:47 ` george at gcc dot gnu dot org
2008-04-26 10:15 ` george at gcc dot gnu dot org
2008-09-01 9:39 ` dominiq at lps dot ens dot fr
5 siblings, 0 replies; 7+ messages in thread
From: george at gcc dot gnu dot org @ 2008-04-26 9:47 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from george at gcc dot gnu dot org 2008-04-26 09:46 -------
Subject: Bug 35154
Author: george
Date: Sat Apr 26 09:46:01 2008
New Revision: 134696
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=134696
Log:
2008-04-26 George Helffrich <george@gcc.gnu.org>
PR fortran/35892
PR fortran/35154
* fortran/trans-common.c (create_common): Add decl to function
chain (if inside one) to preserve identifier scope in debug output.
* testsuite/gfortran.dg/debug/pr35154-stabs.f: New test case for
.stabs functionality.
* testsuite/gfortran.dg/debug/pr35154-dwarf2.f: New test case for
DWARF functionality.
Added:
trunk/gcc/testsuite/gfortran.dg/debug/pr35154-dwarf2.f
trunk/gcc/testsuite/gfortran.dg/debug/pr35154-stabs.f
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-common.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35154
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/35154] Unable to reference symbols in Fortran COMMON due to .stabs format
2008-02-10 11:35 [Bug fortran/35154] New: Unable to reference symbols in Fortran COMMON due to .stabs format george at gly dot bris dot ac dot uk
` (3 preceding siblings ...)
2008-04-26 9:47 ` george at gcc dot gnu dot org
@ 2008-04-26 10:15 ` george at gcc dot gnu dot org
2008-09-01 9:39 ` dominiq at lps dot ens dot fr
5 siblings, 0 replies; 7+ messages in thread
From: george at gcc dot gnu dot org @ 2008-04-26 10:15 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from george at gcc dot gnu dot org 2008-04-26 10:14 -------
Reworked patch committed as rev. 134696.
--
george at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35154
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/35154] Unable to reference symbols in Fortran COMMON due to .stabs format
2008-02-10 11:35 [Bug fortran/35154] New: Unable to reference symbols in Fortran COMMON due to .stabs format george at gly dot bris dot ac dot uk
` (4 preceding siblings ...)
2008-04-26 10:15 ` george at gcc dot gnu dot org
@ 2008-09-01 9:39 ` dominiq at lps dot ens dot fr
5 siblings, 0 replies; 7+ messages in thread
From: dominiq at lps dot ens dot fr @ 2008-09-01 9:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from dominiq at lps dot ens dot fr 2008-09-01 09:37 -------
On i686-apple-darwin9, I have the following failures in both 32 and 64 bit
modes:
FAIL: gfortran.dg/debug/pr35154-dwarf2.f -gdwarf-2 scan-assembler DW_AT_name:
"__BLNK__"
FAIL: gfortran.dg/debug/pr35154-dwarf2.f -gdwarf-2 scan-assembler DW_AT_name:
"label"
Looking at the assembly code I see:
...
.ascii "__BLNK__\0" # DW_AT_name
.ascii "i\0" # DW_AT_name
.ascii "j\0" # DW_AT_name
.ascii "label\0" # DW_AT_name
...
I thing that changing
C { dg-final { scan-assembler "DW_AT_name: \"__BLNK__\"" } }
C { dg-final { scan-assembler "DW_AT_name: \"label\"" } }
with
C { dg-final { scan-assembler "DW_AT_name: \"__BLNK__.*\"" } }
C { dg-final { scan-assembler "DW_AT_name: \"label.*\"" } }
will fix the failures.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35154
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-09-01 9:39 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-10 11:35 [Bug fortran/35154] New: Unable to reference symbols in Fortran COMMON due to .stabs format george at gly dot bris dot ac dot uk
2008-02-14 9:10 ` [Bug fortran/35154] " george at gcc dot gnu dot org
2008-04-02 8:02 ` george at gcc dot gnu dot org
2008-04-19 6:50 ` jvdelisle at gcc dot gnu dot org
2008-04-26 9:47 ` george at gcc dot gnu dot org
2008-04-26 10:15 ` george at gcc dot gnu dot org
2008-09-01 9:39 ` dominiq at lps dot ens dot fr
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).