[Issue 17917] New: Wrong code gen with "-O -cov"

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Oct 19 15:06:49 UTC 2017


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

          Issue ID: 17917
           Summary: Wrong code gen with "-O -cov"
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: major
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: mihails.strasuns.contractor at sociomantic.com

This function
https://github.com/sociomantic-tsunami/ocean/blob/v3.0.0/src/ocean/core/array/Search.d#L1272-L1290
starts to fail test when compiled with "-O -cov" (both flags matter).
Investigation shows that it doesn't do early return after first conditon of
`&&` expression fails, as demanded by spec.

However, the very same function and test don't fail when compiled alone,
outside of whole ocean codebase. I don't have smaller reproducible test case
yet.

--


More information about the Digitalmars-d-bugs mailing list