www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 9908] New: CTFE ICE global static array with block initializer

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

           Summary: CTFE ICE global static array with block initializer
           Product: D
           Version: D1 & D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: clugdbug yahoo.com.au


--- Comment #0 from Don <clugdbug yahoo.com.au> 2013-04-08 21:27:07 PDT ---
static const int[3] sa1 = 1;
bool blah()
{
    return sa1 == [1,1,1];
}
static assert(blah());
--
bug.d(7): Error: CTFE internal error: bad compare
dmd: ctfeexpr.c:1297: int ctfeRawCmp(Loc, Expression*, Expression*): Assertion
`0' failed.

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



--- Comment #1 from github-bugzilla puremagic.com 2013-04-09 02:09:06 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/1af616467ec0cda89501f9d2a130f9b4b811628c
Fix issue 9908 CTFE ICE block initialized global static array

Specify the required type, so that T[n] arr = x it is converted into
T[n] arr = [x,x,x].

https://github.com/D-Programming-Language/dmd/commit/679b743f97aeb5c6fdf2d9d3f8e60965224331dd
Merge pull request #1878 from donc/ice9908ctfeblockinit

Fix bug 9908 CTFE ICE block initialized global static array

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


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|D1 & D2                     |D1
            Summary|CTFE ICE global static      |(D1 only) CTFE ICE global
                   |array with block            |static array with block
                   |initializer                 |initializer


--- Comment #2 from Kenji Hara <k.hara.pg gmail.com> 2013-04-09 02:09:49 PDT ---
Fixed in D2.

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