www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 21779] New: assert not omitted for -release

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

          Issue ID: 21779
           Summary: assert not omitted for -release  -checkaction=context
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: moonlightsentinel disroot.org

The following code passes when compiled with -release but fails when adding
-checkaction=context:

----------------------------------------------

int boo()
{
    assert(false);
}

void main()
{
    assert(boo()); // Should be omitted
}

----------------------------------------------

dmd -release -run test.d => Success

dmd -release -checkaction=context -run test.d => Failure

--
Mar 28