Summary: OS X: wrong value is passed to simple argument with a
                    lazy parameter with -unittest -release -O
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Mac OS X
            Status: NEW
          Keywords: wrong-code
          Severity: major
          Priority: P2
         Component: DMD

--- Comment #0 from 2011-08-16 10:58:09 PDT ---
void enforce6506(bool condition, lazy int m) {
void toImpl6506(int value) {
    enforce6506(value >= 0, 4);
void bug6506() {

void main() { bug6506(); }
$ dmd -unittest -release -O z.d
$ ./z
core.exception.AssertError@z(2): Assertion failure

The bug _does_not_ appear when:
 - one of '-unittest', '-release', and '-O' doesn't exist.
 - the type of 'condition' is not 'bool', 'u?(byte|short|int)' and '[wd]?char'.
 - the 'lazy' argument doesn't exist.

This bug is preventing OS X from passing Phobos' unit test in the release build
after fixing bug 6377. See also

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to