g77 3.4.(2|3): Failure when calling gcc 3.4.(2|3) functions

Samuel Ziegler sam@xpedion.com
Wed Nov 17 01:24:00 GMT 2004


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



More information about the Gcc-help mailing list