[Patch, Fortran] PR34079 - Fix returning of character bind(c) functions

Tobias Burnus burnus@net-b.de
Sat Nov 24 14:37:00 GMT 2007


:ADDPATCH fortran:

For
  character(len=1,kind=c_char) FUNCTION func() bind(c)

the C equivalent is:
  char func(void)

However, gfortran was passing the character as reference (older dump,
still contained the char length arguments):
   bar (__result, .__result, x, _x)

This patch fixes it.

Build and regression tested on x86-64. OK for the trunk?

Tobias
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: bind-c-return.diff
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20071124/47430875/attachment.ksh>


More information about the Fortran mailing list