public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: "sean yang" <seanatpurdue@hotmail.com>
To: gcc-help@gcc.gnu.org
Subject: g77/gfortran incompatibilities---name mangling
Date: Sun, 11 Jun 2006 03:00:00 -0000	[thread overview]
Message-ID: <BAY105-F7144C8C28C147B0857AEEC08E0@phx.gbl> (raw)

I saw a same question asked on the mailing list(date back to last year), but 
it was not answered.

Can I somehow make the code compiled by gfortran compatible to the code 
compiled by g77? Because symbol name in lots of libraries are g77 
compitable. Here is a concrete example,

I tried to compile the following mpi programs with g77(the fotran compiler 
under the directory  /usr/bin on my machine) and gfotran (the fortran 
compiler I generated from gcc 4.0.2)
#/usr/bin/g77 -c test.f
#nm test.o
00000029 T MAIN__
         U mpi_comm_rank__
         U mpi_comm_size__
         U mpi_finalize__
         U mpi_init__


#/home/gcc402/bin/gfortran -c test.f
#nm test.o
00000000 T MAIN__
         U mpi_comm_rank_
         U mpi_comm_size_
         U mpi_finalize_
         U mpi_init_
--------------------test.f-------------
        program main

      include 'mpif.h'

      double precision  PI25DT
      parameter        (PI25DT = 3.141592653589793238462643d0)

      double precision  mypi, pi, h, sum, x, f, a
      integer n, myid, numprocs, i, rc
c                                 function to integrate
      f(a) = 4.d0 / (1.d0 + a*a)

      call MPI_INIT( ierr )
      call MPI_COMM_RANK( MPI_COMM_WORLD, myid, ierr )
      call MPI_COMM_SIZE( MPI_COMM_WORLD, numprocs, ierr )

30   call MPI_FINALIZE(rc)
      stop
      end
----------------------------------------------------

_________________________________________________________________
DonÂ’t just search. Find. Check out the new MSN Search! 
http://search.msn.click-url.com/go/onm00200636ave/direct/01/

             reply	other threads:[~2006-06-11  3:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-11  3:00 sean yang [this message]
2006-06-11  3:43 ` Tim Prince

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BAY105-F7144C8C28C147B0857AEEC08E0@phx.gbl \
    --to=seanatpurdue@hotmail.com \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).