www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 6894] New: [ICE] (backend\cod1.c 1737) with immutable and static

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

           Summary: [ICE] (backend\cod1.c 1737) with immutable and static
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: bearophile_hugs eml.cc



int foo(int[1]) {
    return 1;
}
void main() {
    immutable int[1] array = [0];
    static int perms = foo(array);
}



DMD 2.057head gives:
Internal error: backend\cod1.c 1737

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 05 2011
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6894


yebblies <yebblies gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-invalid-code
                 CC|                            |yebblies gmail.com
           Platform|x86                         |All
         OS/Version|Windows                     |All



With the current version of 2.057, you get this:
assert interpret.c(100) v->ctfeAdrOnStack >= 0 && v->ctfeAdrOnStack <
stackPointer()

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




With dmd 2.061alpha it gives:

Internal error: backend\cod1.c 1718

- - - - - - - - -

Maybe related:


bool foo(int[3] data) {
    return true;
}
struct Bar(T...) if (foo(T[0])) {}
void main() {
    immutable int[3] array = [1, 2, 3];
    Bar!array b;
}

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


Don <clugdbug yahoo.com.au> changed:

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



Now works in git HEAD

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 20 2013