------- Comment #5 from Lulin dot Song at gmail dot com  2010-08-31 18:06 
-------
(In reply to comment #2)
> Try compiling with -fdump-tree-original and inspecting the 
> expected argument lists.  You really don't want to use a
> function here.  Use a subroutine.
> 
> include <stdio.h>
> 
> void requestdouble_(double*, double*, char *, int *len);
> 
> int main()
> {
>     char str[20];
>     int len;
>     double lat=10.0;
>     double lon=20.0;
>     requestdouble_(&lat, &lon, str, &len);
>     return 0;
> }
> subroutine requestdouble(rlat,rlng,str)
>   IMPLICIT NONE
>   REAL(KIND=8), INTENT(IN) :: rlat ! - latitude -
>   REAL(KIND=8), INTENT(IN) :: rlng ! - longitude -
>   CHARACTER(LEN=*) :: str
>   PRINT *, ' requestdouble rlat=', rlat,' rlng=', rlng
>   str='1111111111111111'
>   RETURN
> END subroutine requestdouble
> 
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?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45466

Reply via email to