------- Comment #6 from kargl at gcc dot gnu dot org 2010-08-31 19:09 -------
(In reply to comment #5)
> Thanks. I do know how to work around it with subroutine which I already did in
> my program. But it doesn't explain why 4.1.2 version allows return character
> string from function. Our program works well until the gcc upgrade.
> Is this new standard?
I don't know what you mean by 'new standard'.
I have gfortran 4.3.x, 4.4.x, 4.5.x, and 4.6.0 installed.
-fdump-tree-original for these compilers all show
requestdouble (__result, .__result, rlat, rlng)
4.4, 4.5, and 4.6:
requestdouble (character(kind=1)[1:.__result] & __result,
integer(kind=4) .__result, real(kind=8) & rlat,
real(kind=8) & rlng)
The first returned argument is a pointer to the string
and the second returned argument is the length.
I don't know what 4.1 and 4.2 do. You're clearly
(ab)using the abi to do mixed language program,
and you need to investigate the calling conventions
when you have problems.