www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 17603] New: "undefined reference to `__dmd_personality_v0'"


          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 puremagic.com
          Reporter: dlang-bugzilla thecybershadow.net

//////// test.d ///////
__gshared bool dtorRan;

struct S
        dtorRan = true;

    void m() {}

extern(C) int main()
    dtorRan = false;
        S s;
    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

Jul 05