This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
g77 3.4.(2|3): Failure when calling gcc 3.4.(2|3) functions
- From: Samuel Ziegler <sam at xpedion dot com>
- To: fortran at gcc dot gnu dot org
- Date: Fri, 19 Nov 2004 13:08:44 -0800
- Subject: g77 3.4.(2|3): Failure when calling gcc 3.4.(2|3) functions
Hi... I posted this to gcc-help, but didn't get a response. It seems
like this list is more about gfortran, but I thought I'd give it a try
here. I'm sorry if this is not appropriate for this list.
--- Begin original message ---
Hi... I'm not sure if I should ask this here or on the fortran mailing
list. I'm having this issue where g77 3.4.x code calling gcc 3.4.x
code.
Here is the C function declaration:
int set_env_current_step(n)
int *n;
{
...
}
Here is the Fortran call of it:
integer ierr,set_env_current_step
ierr=set_env_current_step(n-1)
With gcc 3.3.3 and g77 3.3.3, everything works fine. However, with g77
3.4.x, n gets the int value passed to it instead of the pointer to the
int value.
When I tried recompiling using gcc 3.4.2 and g77 3.3.3, everything
worked fine.
It seems to be this specific function, for some reason. There are lots
of other calls from the fortran code to the C code which work without
issue.
Also, when I tried to create a small test case, I couldn't recreate the
issue.
I have plenty of debug info, assembler output, but was unsure what was
required.
Thanks for any help!
- Sam