[Issue 15014] New: Win64: Invalid C++ mangling for multiple long arguments
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sat Sep 5 00:48:10 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=15014
Issue ID: 15014
Summary: Win64: Invalid C++ mangling for multiple long
arguments
Product: D
Version: D2
Hardware: x86_64
OS: Windows
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: r.sagitario at gmx.de
Detected by the fuzzer and manually reduced:
// cppa.d
extern(C++) void fuzz1_cppvararg(long arg10, long arg11, bool arg12);
extern(C++) void fuzz1_dvararg(long arg10, long arg11, bool arg12)
{
fuzz1_checkValues(arg10, arg11, arg12);
}
extern(C++) void fuzz1_checkValues(long arg10, long arg11, bool arg12)
{
assert(arg10 == 103);
assert(arg11 == 104);
assert(arg12 == false);
}
void main()
{
long arg10 = 103;
long arg11 = 104;
bool arg12 = false;
fuzz1_dvararg(arg10, arg11, arg12);
fuzz1_cppvararg(arg10, arg11, arg12);
}
// cppb.cpp
void fuzz1_checkValues(long long arg10, long long arg11, bool arg12);
void fuzz1_cppvararg(long long arg10, long long arg11, bool arg12)
{
fuzz1_checkValues(arg10, arg11, arg12);
}
compile with 64-bit cl:
cl /c cppd.cpp
dmd -m64 cppa.d cppd.obj
cppa.obj : error LNK2019: unresolved external symbol "void __cdecl
fuzz1_cppvararg(__int64,__int64,bool)" (?fuzz1_cppvararg@@YAX_J_J_N at Z)
referenced in function _D4cppa5fuzz1FZv
cppb.obj : error LNK2019: unresolved external symbol "void __cdecl
fuzz1_checkValues(__int64,__int64,bool)" (?fuzz1_checkValues@@YAX_J0_N at Z)
referenced in function "void __cdecl fuzz1_cppvararg(__int64,__int64,bool)"
(?fuzz1_cppvararg@@YAX_J0_N at Z)
--
More information about the Digitalmars-d-bugs
mailing list