------- Comment #5 from fxcoudert at gcc dot gnu dot org  2009-07-29 10:28 
-------
The patch seems to work:

$ cat a.f90 
subroutine foo
   use ISO_C_BINDING 
   implicit none 
   interface 
      function LoadLibrary(lpFileName) bind(C,name='LoadLibraryA') 
         use ISO_C_BINDING 
         implicit none 
         !gcc$ ATTRIBUTES STDCALL :: LoadLibrary 
         integer(C_INTPTR_T) LoadLibrary 
         character(kind=C_CHAR) lpFileName(*) 
      end function LoadLibrary 
   end interface

   integer(c_intptr_t) :: i
   i = LoadLibrary ("file" // achar(0))
end subroutine
$ i586-pc-mingw32-gfortran -c a.f90       
$ i586-pc-mingw32-nm a.o|grep LoadLibraryA
         U _loadlibra...@4


-- 


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

Reply via email to