[Patch, Fortran] PR34246 - Fix for character bind(C) functions

Tobias Burnus burnus@net-b.de
Sun Dec 9 22:40:00 GMT 2007


I implemented a while a go a patch which should generate for
   character(len=1,kind=c_char) function foo() bind(C)
an interface matching the C prototype
  char foo()

However, the test case failed on some systems (e.g. working on x86-64
but failing on x86-32). It turned out that the returned value was still
regarded as array by the middle end.

The attached patch fixes this; as the patch was created on a
try-and-error bases, it should be carefully reviewed.

Build and regression tested (check-gfortran + gomp) with -m32 and -m64
on x86-64-linux.

OK for the trunk?

Tobias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bind-c-fixes.diff
Type: application/unknown
Size: 6892 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20071209/00373899/attachment.bin>


More information about the Gcc-patches mailing list