[Bug fortran/40898] STDCALL mangling problem for strings @8 instead of @4

burnus at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Wed Jul 29 07:04:00 GMT 2009



------- Comment #1 from burnus at gcc dot gnu dot org  2009-07-29 07:04 -------
Function declaration

       function LoadLibrary(lpFileName) bind(C,name='LoadLibraryA')
!gcc$ ATTRIBUTES STDCALL :: LoadLibrary
         use ISO_C_BINDING

... and use

hmodule = LoadLibrary('fun.dll'//achar(0))

... and dump

hmodule = loadlibrary (&"fun.dll"[1]{lb: 1 sz: 1});

Reported error:

  undefined reference to `LoadLibraryA@8'

For a 32bit system, one expects a single 4-bye pointer and thus @4. However, I
do not see any reason why it should be 64bit instead of 32bits. It also cannot
be a 64bit Windows as one there does not use STDCALL.


-- 

burnus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fxcoudert at gcc dot gnu dot
                   |                            |org


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



More information about the Gcc-bugs mailing list