[Issue 15989] Win32 optimizer bug

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri Sep 30 13:40:56 PDT 2016


https://issues.dlang.org/show_bug.cgi?id=15989

--- Comment #4 from Walter Bright <bugzilla at digitalmars.com> ---
The trouble appears to be the line:

    new ShiftOr();

which is evaluated at compile time (because of the enum) yet is expected to
exist at runtime. Creating items on the GC heap with operator new does not
transfer from compile time to runtime. I don't see how this can possibly work,
and the compiler should issue an error message for it.

It has nothing to do with optimizer flags, as it doesn't work regardless, it
just happens to fail in a way that doesn't seg fault when -O is not specified.

--


More information about the Digitalmars-d-bugs mailing list