This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
g77 (egcs-1.1.2): warning: multiple common of ...
- To: gcc-bugs at gcc dot gnu dot org
- Subject: g77 (egcs-1.1.2): warning: multiple common of ...
- From: Harald Harders <Harald dot Harders at dlr dot de>
- Date: Mon, 18 Oct 1999 17:13:32 +0200 (MEST)
- Reply-To: harald dot harders at dlr dot de
Hello,
first of all the data of my system:
Compiler: g77 version egcs-2.91.66 19990314 (egcs-1.1.2 release) (from
FSF-g77 version 0.5.24-19981002)
Computer: i686
OS: SuSE Linux 6.1
The output of the compiler:
$ g77 -Wall -c two_files.f -o two_files.o
$ g77 -Wall -c sub.f -o sub.o
$ g77 -o two_files two_files.o sub.o
sub.o: warning: multiple common of `asdf_'
two_files.o: warning: previous common is here
$
The common block asdf is used both in two_files.f and sub.f.
When I use common blocks in more than one file the warning above is made.
Compiling everything by once does not help either:
$ g77 -Wall -o two_files two_files.f sub.f
/tmp/cccqHI0T.o: warning: multiple common of `asdf_'
/tmp/ccmqa56h.o: warning: previous common is here
$
There is now warning if the common block is only used in one file:
$ g77 -Wall -o one_file one_file.f
$
I think it can't be right that you are not able to use one common block
only in one file. In addition older versions of g77 did not produce this
warning. In all three examples the program does work correctly.
The needed files to test the warning are attached in the file
hh_example.tar.gz.
Yours
Harald
------------------------------------------------------------------
Detailed output:
$ g77 -v --save-temps -Wall -o two_files two_files.f sub.f
g77 version egcs-2.91.66 19990314 (egcs-1.1.2 release) (from FSF-g77
version 0.5.24-19981002)
Driving: g77 -v -save-temps -Wall -o two_files two_files.f sub.f -lg2c -lm
Reading specs from /usr/lib/gcc-lib/i486-linux/egcs-2.91.66/specs
gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release)
/usr/lib/gcc-lib/i486-linux/egcs-2.91.66/f771 two_files.f -quiet
-dumpbase two_files.f -Wall -version -fversion -o two_files.s
GNU F77 version egcs-2.91.66 19990314 (egcs-1.1.2 release) (i486-linux)
compiled by GNU C version egcs-2.91.66 19990314 (egcs-1.1.2 release).
GNU Fortran Front End version 0.5.24-19981002
/usr/i486-linux/bin/as -V -Qy -o two_files.o two_files.s
GNU assembler version 2.9.1 (i486-linux), using BFD version 2.9.1.0.22
/usr/lib/gcc-lib/i486-linux/egcs-2.91.66/f771 sub.f -quiet -dumpbase
sub.f -Wall -version -fversion -o sub.s
GNU F77 version egcs-2.91.66 19990314 (egcs-1.1.2 release) (i486-linux)
compiled by GNU C version egcs-2.91.66 19990314 (egcs-1.1.2 release).
GNU Fortran Front End version 0.5.24-19981002
/usr/i486-linux/bin/as -V -Qy -o sub.o sub.s
GNU assembler version 2.9.1 (i486-linux), using BFD version 2.9.1.0.22
/usr/lib/gcc-lib/i486-linux/egcs-2.91.66/collect2 -m elf_i386
-dynamic-linker /lib/ld-linux.so.2 -o two_files /usr/lib/crt1.o
/usr/lib/crti.o /usr/lib/gcc-lib/i486-linux/egcs-2.91.66/crtbegin.o
-L/home/fk7b/usr/local/qt-2.00/lib
-L/usr/lib/gcc-lib/i486-linux/egcs-2.91.66 -L/usr/i486-linux/lib
two_files.o sub.o -lg2c -lm -lgcc -warn-common -lc -lgcc
/usr/lib/gcc-lib/i486-linux/egcs-2.91.66/crtend.o /usr/lib/crtn.o
sub.o: warning: multiple common of `asdf_'
two_files.o: warning: previous common is here
$
--
__/|__ Harald Harders Mail: harald.harders@dlr.de
/_/_/_/ DLR Tel.: (05 31) 2 95 - 26 78
|/ Institut fuer Flugmechanik Fax.: (05 31) 2 95 - 26 47
DLR Lilienthalplatz 7 http://www.fm.bs.dlr.de/flugmechanik/
D-38108 Braunschweig http://mbpc06.mb.ing.tu-bs.de/~harders/
hh_example.tar.gz