This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/34246] gfortran.dg/bind_c_usage_16.f03 doesn't work
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Nov 2007 23:12:08 -0000
- Subject: [Bug fortran/34246] gfortran.dg/bind_c_usage_16.f03 doesn't work
- References: <bug-34246-682@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from burnus at gcc dot gnu dot org 2007-11-27 23:12 -------
character(kind=1) __result_foo[1:1];
<retval> = __result_foo;
As Andrew pointed out, we return an array and not a scalar.
TODO:
a) Check that we expect a scalar to be returned in gfc_conv_function_call.
b) Ensure that we return a scalar - not only for FUNCTION but also for ENTRY.
Possible place to do this is gfc_generate_function_code.
c) Fix the following ICE (occurs if either the function or the entry is bind(C)
or both):
function test() bind(C)
use iso_c_binding
implicit none
character(len=1,kind=c_char) :: test, bar
entry bar() bind(C)
end function test
d) Find out whether we are still crashing on some systems; if yes, fix it.
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-valid-code
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34246