Google Groups Home
Help | Sign in
Message from discussion weird g77 and gfortran
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Charles Coldwell  
View profile
 More options May 6, 11:10 pm
Newsgroups: comp.lang.fortran
From: Charles Coldwell <coldw...@gmail.com>
Date: Wed, 07 May 2008 03:10:21 GMT
Local: Tues, May 6 2008 11:10 pm
Subject: Re: weird g77 and gfortran

lind...@pbm.com (Greg Lindahl) writes:
> In article <5065dea5-eb9e-4b0c-9413-04252b88e...@34g2000hsh.googlegroups.com>,
> K-9  <rick.peng...@gmail.com> wrote:

>>Good question. I'm trying to use g77 because i'm trying to develop
>>some fortran77-only code. Of course yes i can go with gfortran. I was
>>just curious to see the reason.

> Check out the f2c-abi. On x86 and x86-64, this is the difference between
> g77 and gfortran's calling conventions.

In that case, does this declaration fix the OP's code:

extern double r_ (int * d, float *b);

i.e., in the C code, declare the return value to be double, but
maintain the "real function r(m,t)" definition in the Fortran code
compiled by g77.

Chip

--
Charles M. "Chip" Coldwell
"Turn on, log in, tune out"
GPG Key ID: 852E052F
GPG Key Fingerprint: 77E5 2B51 4907 F08A 7E92  DE80 AFA9 9A8F 852E 052F


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google