www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 21598] New: checkaction=context reruns pure functions with


          Issue ID: 21598
           Summary: checkaction=context reruns pure functions with debug
                    blocks on failure
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: moonlightsentinel disroot.org

extern(C) int puts(const scope char*);

void main()

int foo(int i) pure nothrow
    debug puts("Hello");
    return i - 1;
Currently outputs:

This is caused by dmd omitting the temporary for pure function calls
(op.hasSideEffect == false).

Jan 31 2021