------- 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

Reply via email to