Comment #0 by snarwin+bugzilla — 2020-05-29T13:04:25Z
The following example compiles successfully on 64-bit Linux, but fails on 32-bit Linux:
---
module testInference;
import core.demangle: demangle;
void foo8504()() {}
auto toDelegate8504a(F)(auto ref F fp) { return fp; }
extern(C) void testC8504() {}
void test8504()
{
// commenting out the following line makes the test pass on 32-bit linux
static assert(demangle(foo8504!().mangleof) == "pure nothrow @nogc @safe void testInference.foo8504!().foo8504()");
auto fp1 = toDelegate8504a(&testC8504);
static assert(typeof(fp1).stringof == "extern (C) void function()");
}
---
Error message on 32-bit Linux:
---
testInference.d(19): Error: static assert: `"extern (C) void function() @system" == "extern (C) void function()"` is false
---
Possibly related to issue 3796.