[Issue 14195] New: Ice when mangling templated function parameter extern(C++) function
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Tue Feb 17 10:38:28 PST 2015
https://issues.dlang.org/show_bug.cgi?id=14195
Issue ID: 14195
Summary: Ice when mangling templated function parameter
extern(C++) function
Product: D
Version: D2
Hardware: x86_64
OS: Windows
Status: NEW
Severity: normal
Priority: P1
Component: DMD
Assignee: nobody at puremagic.com
Reporter: code at benjamin-thaut.de
struct Delegate1(T) {}
struct Delegate2(T1, T2) {}
template Signature(T)
{
alias Signature = typeof(*(T.init));
}
alias del1_t = Delegate1!(Signature!(void function()));
alias del2_t = Delegate2!(Signature!(int function(float, double)),
Signature!(int function(float, double)));
extern(C++)
{
void DelegateTest1(del1_t);
void DelegateTest2(del2_t);
}
When compiling with the latest dmd from git head on windows this will output:
Error: ICE: Unsupported type void()
Error: ICE: Unsupported type int(float, double)
Error: ICE: Unsupported type int(float, double)
It should mangle the functions as:
static assert(DelegateTest1.mangleof ==
"?DelegateTest1@@YAXU?$Delegate1@$$A6AXXZ@@@Z");
static assert(DelegateTest2.mangleof ==
"?DelegateTest2@@YAXU?$Delegate2@$$A6AHMN at Z$$A6AHMN at Z@@@Z");
--
More information about the Digitalmars-d-bugs
mailing list