[Issue 17603] New: "undefined reference to `__dmd_personality_v0'" with -betterC and struct destructors
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Wed Jul 5 06:17:35 PDT 2017
https://issues.dlang.org/show_bug.cgi?id=17603
Issue ID: 17603
Summary: "undefined reference to `__dmd_personality_v0'" with
-betterC and struct destructors
Product: D
Version: D2
Hardware: All
OS: Linux
Status: NEW
Keywords: betterC, link-failure, pull
Severity: enhancement
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: dlang-bugzilla at thecybershadow.net
//////// test.d ///////
__gshared bool dtorRan;
struct S
{
~this()
{
dtorRan = true;
}
void m() {}
}
extern(C) int main()
{
dtorRan = false;
{
S s;
s.m();
}
assert(dtorRan);
return 0;
}
///////////////////////
results in:
cdtor.o:(.eh_frame+0xab): undefined reference to `__dmd_personality_v0'
collect2: error: ld returned 1 exit status
Error: linker exited with status 1
Pull: https://github.com/dlang/dmd/pull/6923
--
More information about the Digitalmars-d-bugs
mailing list