[Issue 20220] New: pragma (crt_constructor) does not work with CC=clang
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Sep 17 07:04:37 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=20220
Issue ID: 20220
Summary: pragma (crt_constructor) does not work with CC=clang
Product: D
Version: D2
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: erny.castell at gmail.com
building this file:
////////////////
module crttest;
import core.stdc.stdio : printf;
pragma (crt_constructor)
extern(C) void constructor {
printf("constructor called\n");
}
void main() {
printf("main called\n");
}
with "CC=clang dmd crttest.d"
When I run the executable the output is:
main called
instead of the expected:
constructor called
main called
I think there is a problem in the DMD backend, probably this issue #19551 is
also related to the same problem
--
More information about the Digitalmars-d-bugs
mailing list