Thread overview
[Issue 4738] New: ICE using null array in static/constraint if
Aug 27, 2010
Shin Fujishiro
Aug 27, 2010
Shin Fujishiro
Aug 31, 2010
Don
Sep 22, 2010
Koroskin Denis
Sep 22, 2010
Koroskin Denis
August 27, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4738

           Summary: ICE using null array in static/constraint if
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: ice-on-valid-code
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: rsinfu@gmail.com
        Depends on: 1982


--- Comment #0 from Shin Fujishiro <rsinfu@gmail.com> 2010-08-26 20:35:01 PDT ---
Since dmd r629: ICE(expression.c, 816) occurs when null array is used in static-if or template constraint.

Repro.
-------------------- test.d
static if (string.init.length > 0)  // null array
{
}
--------------------
% dmd -c -o- test
Assertion failed: (precedence[e->op] != PREC_zero), function expToCBuffer, file
expression.c, line 816.
--------------------

It was a rejects-valid bug 1982 before r629.
--------------------
% dmd-r628 -c -o- test
test.d(1): Error: expression (null.length) > 0u is not constant or does not
evaluate to a bool
--------------------

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
August 27, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4738



--- Comment #1 from Shin Fujishiro <rsinfu@gmail.com> 2010-08-26 20:40:34 PDT ---
The phobos' std.conv hits this issue.

% dmd -c -unittest std/conv.d
Assertion failed: (precedence[e->op] != PREC_zero), function expToCBuffer, file
expression.c, line 816.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
August 31, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4738


Don <clugdbug@yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |clugdbug@yahoo.com.au
         Resolution|                            |FIXED


--- Comment #2 from Don <clugdbug@yahoo.com.au> 2010-08-31 01:02:30 PDT ---
Fixed svn 651.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
September 22, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4738


Koroskin Denis <2korden@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |2korden@gmail.com


--- Comment #3 from Koroskin Denis <2korden@gmail.com> 2010-09-22 03:05:52 PDT ---
Got this issue today. Should I reopen the bug or submit a new ticket?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
September 22, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4738



--- Comment #4 from Koroskin Denis <2korden@gmail.com> 2010-09-22 03:07:47 PDT ---
Original test case has been fixed so I'll create a new report. Sorry for the buzz.

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