This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
bug in g77 debugging information
- From: Jiri Pittner <jiri dot pittner at jh-inst dot cas dot cz>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 29 Dec 2002 11:42:52 +0100
- Subject: bug in g77 debugging information
Dear compiler/debugger developers,
I would like to report a bug in the debugging information
generated by g77 0.5.26 (gcc 3.0.4).
The point is that variables declared in common blocks as
implicit integer (a-z)
integer*8 moiowd
COMMON /LISTS/ MOIO(10,500),MOIOWD(10,500),MOIOSZ(10,500),
& MOIODS(10,500),MOIOFL(10,500)
are compiled correctly, but the debugging information is incorrect,
gdb reports
(gdb) p &moiowd
$11 = (PTR TO -> ( integer4 (10,500))) 0x8fdcba0
(gdb) p &moiofl
$12 = (PTR TO -> ( integer (10,500))) 0x8ff0420
instead having integer8 for moiowd.
However, it seems that even the debugging of 4-byte integers does not work
properly:
(gdb) p moiofl(1,57)
$16 = 0
(gdb) p * (int*) ((void *)&moiofl + 4*10*(57-1))
$17 = 50 ...correct
(gdb) p * (integer8 *) ((void *)&moiowd +8*10*(57-1))
$18 = 7275 ...correct
(gdb) p moiowd(1,57)
$19 = 0
I know that I do not have the most recent version of the compiler/debugger,
but I hope the point is described here clear enough to recognize, whether
it has already been fixed in the meantime, or still persists in the most
recent version.
Best regards,
Jiri Pittner
G77 details are
g77 --verbose
g77 version 3.0.4 (SuSE) (Fortran Frontend version 0.5.26 20020220 (release) (SuSE))
Driving: g77 -v -c -xf77-version /dev/null -xnone
Reading specs from /opt/experimental/lib/gcc-lib/i486-suse-linux/3.0.4/specs
Configured with: ../configure --enable-threads=posix --enable-long-long --prefix=/opt/experimental --with-local-prefix=/usr/local --enable-languages=c,c++,f77,objc,java --disable-nls --enable-shared i486-suse-linux
Thread model: posix
gcc version 3.0.4 (SuSE)
/opt/experimental/lib/gcc-lib/i486-suse-linux/3.0.4/tradcpp0 -lang-fortran -v -D__GNUC__=3 -D__GNUC_MINOR__=0 -D__GNUC_PATCHLEVEL__=4 -D__ELF__ -Dunix -Dlinux -D__ELF__ -D__unix__ -D__linux__ -D__unix -D__linux -Asystem=posix -D__NO_INLINE__ -D__STDC_HOSTED__=1 -Acpu=i386 -Amachine=i386 -Di386 -D__i386 -D__i386__ -D__tune_i486__ /dev/null /dev/null
GNU traditional CPP version 3.0.4 (SuSE)
/opt/experimental/lib/gcc-lib/i486-suse-linux/3.0.4/f771 -fnull-version -quiet -dumpbase g77-version.f -version -fversion -o /scratch/tmp/_32732@jp/ccWdx0gi.s /dev/null
GNU F77 version 3.0.4 (SuSE) (i486-suse-linux)
compiled by GNU C version 3.0.4 (SuSE).
GNU Fortran Front End version 0.5.26 20020220 (release) (SuSE)
as -V -Qy -o /scratch/tmp/_32732@jp/ccod5GMq.o /scratch/tmp/_32732@jp/ccWdx0gi.s
GNU assembler version 2.11.92.0.10 (i486-suse-linux) using BFD version 2.11.92.0.10 20011021 (SuSE)
ld -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o /scratch/tmp/_32732@jp/cceHKG8A /scratch/tmp/_32732@jp/ccod5GMq.o /usr/lib/crt1.o /usr/lib/crti.o /opt/experimental/lib/gcc-lib/i486-suse-linux/3.0.4/crtbegin.o -L/opt/experimental/lib/gcc-lib/i486-suse-linux/3.0.4 -L/opt/experimental/lib/gcc-lib/i486-suse-linux/3.0.4/../../.. -lg2c -lm -lgcc -lc -lgcc /opt/experimental/lib/gcc-lib/i486-suse-linux/3.0.4/crtend.o /usr/lib/crtn.o
/opt/experimental/lib/gcc-lib/i486-suse-linux/3.0.4/libg2c.a(open.o): In function `f_open':
/space/gcc-2.95.2.modified/i686-pc-linux-gnu/libf2c/libI77/open.c:213: the use of `tempnam' is dangerous, better use `mkstemp'
/scratch/tmp/_32732@jp/cceHKG8A
__G77_LIBF77_VERSION__: 0.5.25 19991024 (release)
@(#)LIBF77 VERSION 19990503
__G77_LIBI77_VERSION__: 0.5.25 19991024 (release), largefiles
@(#) LIBI77 VERSION pjw,dmg-mods 19990503
__G77_LIBU77_VERSION__: 0.5.25 19991024 (release)
@(#) LIBU77 VERSION 19980709