[Issue 15989] New: Win32 optimizer bug

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue May 3 15:11:20 PDT 2016


          Issue ID: 15989
           Summary: Win32 optimizer bug
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Severity: major
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: dmitry.olsh at gmail.com

The test case below segfaults with -O but passes without it. Only Windows x86,
tested on DMD from the latest master.

struct Input{}

interface Kickstart{
bool opCall(ref Input );

struct Regex
    Kickstart kickstart;

auto regex()
    return Regex(new ShiftOr());

class ShiftOr : Kickstart
    bool opCall(ref Input )
        return false;

enum ctRegex = regex();

void main()
    auto r = ctRegex;
    auto s = Input();


More information about the Digitalmars-d-bugs mailing list