February 02, 2019
https://issues.dlang.org/show_bug.cgi?id=19640

          Issue ID: 19640
           Summary: Linker error when compiling delegate with betterC
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody@puremagic.com
          Reporter: andy.pj.hanson@gmail.com

**a.d**:
```
int call(int delegate() d) {
        return d();
}

int foo(int i) {
        return call(() => i);
}

void main() {
        foo(0);
}
```

**dub.json**:
```
{
        "name": "test",
        "buildOptions": ["betterC"],
}
```

Output of `dub build`:
```
Performing "debug" build using /usr/bin/dmd for x86_64.
test ~master: building configuration "application"...
Linking...
/usr/bin/ld: error: /usr/lib/x86_64-linux-gnu/libphobos2.a(dmain2_6f5_47b.o):
size of section .dtors.d_dso_dtor[.data.d_dso_rec] is not multiple of address
size
/usr/bin/ld: final link failed: Error reading (null): No error
collect2: error: ld returned 1 exit status
Error: linker exited with status 1
/usr/bin/dmd failed with exit code 1.
```

--