www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 7695] New: ICE on associative array with keys of struct type with const members

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

           Summary: ICE on associative array with keys of struct type with
                    const members
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: simen.kjaras gmail.com



PDT ---
struct Bar {
    const int t;
}

void main( ) {
    int[Bar] a;
    int n = a.length;
}

Assertion failure: 'impl' on line 4407 in file 'mtype.c'

abnormal program termination

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 12 2012
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7695


Nick Sabalausky <cbkbbejeap mailinator.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |cbkbbejeap mailinator.com
            Summary|ICE(mtype.c) on associative |Regression(2.058):
                   |array with keys of struct   |ICE(mtype.c) on associative
                   |type with const members     |array with keys of struct
                   |                            |type with const members
           Severity|normal                      |regression



13:20:23 PDT ---
This is a regression that was introduced in 2.058

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 09 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7695




13:25:42 PDT ---
Don't know if this helps, but the problem also occurs if you replace

const int t;

with:

const opEquals(Bar ) {}

The function must be named opEquals. If it's named "foo", the ICE goes away.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 09 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7695




Commit pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/d46fde7cc0fc4bad25213aee137fd2eeeb2a63af
fix Issue 7695 - Regression(2.058): ICE(mtype.c) on associative array with keys
of struct type with const members

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 09 2012
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7695


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla digitalmars.com
         Resolution|                            |FIXED



20:43:18 PDT ---
The problem here is the const member needs an initializer. The error was
suppressed and ignored, though, causing the compiler to later fail.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 09 2012