This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]