[Bug fortran/40354] bug with procedure pointers and C interoperability

kargl at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri Jun 5 16:53:00 GMT 2009



------- Comment #4 from kargl at gcc dot gnu dot org  2009-06-05 16:53 -------
(In reply to comment #3)
> To get the code to compile, one can change 
> 
>   external sub1
> 
> to
>    real(c_float), external, bind(c) :: sub1
> 

Forgot to add the necessary changes for sub1.

function sub1(a,b) bind(c)
   use iso_c_binding
   real(c_float) sub1
   real(c_float) :: a, b
   sub1 = a+b
   return
end function sub1


-- 


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



More information about the Gcc-bugs mailing list