www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1200] New: DMD crash: some statements containing only a ConditionalStatement with a false condition

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1200

           Summary: DMD crash: some statements containing only a
                    ConditionalStatement with a false condition
           Product: D
           Version: 1.014
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: ice-on-valid-code
          Severity: minor
          Priority: P3
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: deewiant gmail.com


void main() {
        do
                debug {}
        while (true);
}

void main() {
        while (true)
                debug {}
}

void main() {
        with (Object.init)
                debug {}
}

void main() {
        synchronized debug {}
}

void main() {
        volatile debug {}
}

Compile the above without -debug thrown and DMD crashes in the semantic3 stage.

As far as I can tell, this happens only for the above statement types, but for
all types of ConditionalStatement: debug, version, static if.

It's easy to work around (hence severity is only "minor") by adding curly
brackets surrounding the ConditionalStatement, for instance:

void main() {
        volatile { debug {} }
}


-- 
Apr 28 2007
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1200


bugzilla digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED





Fixed DMD 1.018 and DMD 2.002


-- 
Jul 01 2007