[Issue 15985] New: [REG2.068/2.069] Code doesn't link unless compiled with -debug
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Mon May 2 09:54:19 PDT 2016
https://issues.dlang.org/show_bug.cgi?id=15985
Issue ID: 15985
Summary: [REG2.068/2.069] Code doesn't link unless compiled
with -debug
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Keywords: link-failure
Severity: regression
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: thecybershadow at gmail.com
/////////////////////// test.d ///////////////////////
struct S()
{
void delegate() d;
}
S!() f_Ds(U=D*)()
{
static if (is(U == struct))
return S!()
(
{
foreach (i, field; U.init.tupleof)
f_Ds!(typeof(field))();
}
);
static if (is(U V : V*))
return f_Ds!V();
}
void f_E()()
{
auto f = S!()
(
{
enum x = is(typeof(f_Ds!(D*)()));
f_Ds!(D*)();
}
);
}
struct A
{
D* d;
}
struct B
{
}
struct C
{
A a;
B b;
}
struct D
{
C c;
}
void main()
{
f_E();
f_Ds!D();
}
//////////////////////////////////////////////////////
Linux , DMD 2.068.0, with -debug: OK
Linux , DMD 2.068.0, without -debug: OK
Linux , DMD 2.069.0, with -debug: OK
Linux , DMD 2.069.0, without -debug: Link error
Windows, DMD 2.067.0, with -debug: OK
Windows, DMD 2.067.0, without -debug: OK
Windows, DMD 2.068.0, with -debug: OK
Windows, DMD 2.068.0, without -debug: Link error
Bisection attempts point towards master/stable branch merges (i.e. nothing
useful).
It is probably a latent heisenbug triggered by other changes.
Downstream issue: https://github.com/CyberShadow/Digger/issues/36
--
More information about the Digitalmars-d-bugs
mailing list