[Patch, Fortran] PR34079 - BIND(C) and characters - unneeded character length passed
Tobias Burnus
burnus@net-b.de
Sat Nov 17 16:51:00 GMT 2007
Hi FX,
FX Coudert wrote:
> subroutine foo(x) bind(c)
> character(len=1) :: x
> function bar(x) bind(c)
> character(len=1) :: x, bar
>
> foo (x, _x) /* there shouldn't be a _x here */
>
> bar (__result, .__result, x, _x) /* there should be neither _x nor
> .__result here */
I thought we fixed this before!
The prototype should be
void foo(char *x)
and
char bar(char *x)
Thus for bar we should return the character variable and not create a
result variable. For non-character variables, we do it correctly.
Tobias
More information about the Gcc-patches
mailing list