[Bug fortran/17918] New: gfortran .mod files have unusual entries about private common blocks
olchansk at panix dot com
gcc-bugzilla@gcc.gnu.org
Sat Oct 9 23:35:00 GMT 2004
I think this is another regression (I remember fighting this before and this
problem did not exist for a while)- information about private common blocks is
now written into the .mod files. Then, if this .mod file is "used", this
information is also written into the *user's* .mod files, but with some funny
mangling. This is what I see:
[olchansk@tw15 gfortran_test]$ cat test_common2.f90
module test_common2
private
integer iii
common /luns/ iii
end module test_common2
[olchansk@tw15 gfortran_test]$ make test_common2.o
/triumfcs/trshare/olchansk/gcc-tree-ssa/install/bin/gfortran -x f95 -c -o
test_common2.o -O2 -g -Wall -Waliasing -Wline-truncation -Wsurprising
-Wunused-labels -fPIC -ffixed-line-length-132 test_common2.f90
[olchansk@tw15 gfortran_test]$ cat test_common2.mod
GFORTRAN module created from test_common2.f90 on Sat Oct 9 16:30:57 2004
If you edit this, you'll get what you deserve.
(() () () () () () () () () () () () () () () () () () () ())
()
()
(('luns' 2 0))
(2 'iii' 'test_common2' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 ())
)
()
[olchansk@tw15 gfortran_test]$
Then, if I "use" this module:
[olchansk@tw15 gfortran_test]$ cat test_common3.f90
module test_common3
use test_common2
private
integer iii
common /luns/ iii
end module test_common3
[olchansk@tw15 gfortran_test]$ make test_common3.o
/triumfcs/trshare/olchansk/gcc-tree-ssa/install/bin/gfortran -x f95 -c -o
test_common3.o -O2 -g -Wall -Waliasing -Wline-truncation -Wsurprising
-Wunused-labels -fPIC -ffixed-line-length-132 test_common3.f90
[olchansk@tw15 gfortran_test]$ cat test_common3.mod
GFORTRAN module created from test_common3.f90 on Sat Oct 9 16:32:10 2004
If you edit this, you'll get what you deserve.
(() () () () () () () () () ()
() () () () () () () () () ())
()
()
(('_0_luns' 2 0) ('luns' 3 0))
(3 'iii' 'test_common3' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 ())
2 'iii' 'test_common2' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
IN_COMMON) (INTEGER 4 ()) 0 0 () () 0 ())
)
()
[olchansk@tw15 gfortran_test]$
Notice how "luns" and "iii" show up twice?
I think that since all these variables are private, the .mod files should be empty.
[olchansk@tw15 gfortran_test]$
/triumfcs/trshare/olchansk/gcc-tree-ssa/install/bin/gfortran -v
Reading specs from
/triumfcs/trshare/olchansk/gcc-tree-ssa/install-20041008/lib/gcc/i686-pc-linux-gnu/4.0.0/specs
Configured with: ../gcc/configure
--prefix=/triumfcs/trshare/olchansk/gcc-tree-ssa/install-20041008
--with-mpfr-dir=/triumfcs/trshare/olchansk/gcc-tree-ssa/mpfr/mpfr-2.0.3
--with-gmp-dir=/triumfcs/trshare/olchansk/gcc-tree-ssa/mpfr/gmp-4.1.3
--enable-languages=c,f95
Thread model: posix
gcc version 4.0.0 20041009 (experimental)
K.O.
--
Summary: gfortran .mod files have unusual entries about private
common blocks
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: olchansk at panix dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17918
More information about the Gcc-bugs
mailing list