[Bug fortran/45466] Bus Error: C program calls Fortran Function which has returned value as Character string

2010-09-01 Thread Lulin dot Song at gmail dot com
--- Comment #11 from Lulin dot Song at gmail dot com 2010-09-01 15:29 --- (In reply to comment #10) > (In reply to comment #9) > > when the return value is character string, is it more intuitive to be > > > > requestdouble ( real(kind=8) & rlat, real(kind=8)

[Bug fortran/45466] Bus Error: C program calls Fortran Function which has returned value as Character string

2010-09-01 Thread Lulin dot Song at gmail dot com
--- Comment #9 from Lulin dot Song at gmail dot com 2010-09-01 14:22 --- (In reply to comment #8) > (In reply to comment #0) > > Main program is written in C. (see the following) > > I strongly suggest using the C Binding facility of Fortran 2003 instead of > relyin

[Bug fortran/45466] Bus Error: C program calls Fortran Function which has returned value as Character string

2010-08-31 Thread Lulin dot Song at gmail dot com
--- 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. > >

[Bug fortran/45466] Bus Error: C program calls Fortran Function which has returned value as Character string

2010-08-31 Thread Lulin dot Song at gmail dot com
--- Comment #4 from Lulin dot Song at gmail dot com 2010-08-31 18:02 --- (In reply to comment #1) > I think the return value for character(16) returns are passed via the first > argument. So I think this is invalid. > If the return value of function 'requestdouble

[Bug fortran/45466] New: Bus Error: C program calls Fortran Function which has returned value as Character string

2010-08-31 Thread Lulin dot Song at gmail dot com
aracter string Product: gcc Version: 4.4.3 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: Lulin dot Song at gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45466