This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

g77 link problem with COMMON-blocks


I have several files to link. Each contains a named COMMON
block with the same variables for global use in the program.
If I use the gcc-2.7.2 based g77 on a Linux box (kernel
2.0.36), there are no warnings and errors. With the egcs
based g77 0.5.24 (Linux kernel 2.2.7) there are a lot of
warnings that the named COMMON blocks are multiple
used in the program.
If I put all the routines in one file (the same source!) and
compile it, no errors or warnings are reported. Do you have
an answer to this behaviour (maybe a special compiler
flag for the egcs-based version or a patch for the g77) ?

I have attached a very simple program in a tar-archive
that shows the described problems while linking main.o and
sub.o. ("main.o: warning: multiple common of `abc_'
 sub.o: warning: previous common is here")

Best regards

Karsten Breuer

Version information:
- g77 version egcs-2.91.66 19990314 (egcs-1.1.2 release)
  (from FSF-g77 version 0.5.24-19981002)
- Linux 2.2.7 #12 SMP Wed Jul 21 10:32:55 MEST 1999 i686
  unknown

The following section of this message contains a file attachment
prepared for transmission using the Internet MIME message format.
If you are using Pegasus Mail, or any another MIME-compliant system,
you should be able to save it or view it from within your mailer.
If you cannot, please ask your system administrator for assistance.

   ---- File information -----------
     File:  sample.tar
     Date:  30 Jul 1999, 9:30
     Size:  10240 bytes.
     Type:  Unknown

sample.tar


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]