www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 15492] New: ICE (segfault) on class { auto f() with out

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

          Issue ID: 15492
           Summary: ICE (segfault) on class { auto f() with out contract }
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: eiderdaus gmail.com

class A {
        auto f()
            out { assert (true); }
            body { }
    }

DMD v2.069.2-b1 segfaults for me (Debian 6), so does DMD 2.069.1 on dpaste:
    http://dpaste.dzfl.pl/b8502e7fb31f

Any of the following makes the segfault disappear:
*   change 'class' to 'struct',
*   change 'auto' to 'void',
*   change 'out' to 'in', or remove the entire contract.

This bug is different from the following bug report; the following bug is
resolved+fixed, and its sample code doesn't segfault DMD for me:
    https://issues.dlang.org/show_bug.cgi?id=10596

-- Simon

--
Dec 31