This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/40898] STDCALL mangling problem for strings @8 instead of @4
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Jul 2009 07:04:18 -0000
- Subject: [Bug fortran/40898] STDCALL mangling problem for strings @8 instead of @4
- References: <bug-40898-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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