Bug 3920 – Assertion failure: '0' on line 10018 in file 'expression.c'

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2010-03-09T18:03:00Z
Last change time
2014-02-15T02:43:05Z
Keywords
ice-on-valid-code, patch
Assigned to
nobody
Creator
aldonunez1

Comments

Comment #0 by aldonunez1 — 2010-03-09T18:03:42Z
The error is in MulExp::semantic. It happens no matter if the multiplication expression is in a template. These are the combinations that fail: IF / ifloat IF / IF ID / idouble ID / ID IR / ireal IR / IR Here's a sample: import std.stdio; typedef ifloat IF; typedef idouble ID; typedef ireal IR; template PrintAddedType(X, Y) { void PrintAddedType() { X x; Y y; writeln( typeid( x ), " ", typeid( y ), " ", typeid( x / y ) ); } } template PrintAddedType(X) { void PrintAddedType() { /* PrintAddedType!(X, ifloat)(); PrintAddedType!(X, idouble)(); PrintAddedType!(X, ireal)(); */ /* PrintAddedType!(X, IF)(); PrintAddedType!(X, ID)(); PrintAddedType!(X, IR)(); */ } } void main() { /* PrintAddedType!(IF)(); PrintAddedType!(ID)(); PrintAddedType!(IR)(); */ IR x; IR y; writeln( typeid( x ), " ", typeid( y ), " ", typeid( x / y ) ); }
Comment #1 by clugdbug — 2010-03-10T23:56:41Z
The patch for bug 3919 fixes this one, too.
Comment #2 by bugzilla — 2010-03-12T20:53:31Z
changeset 415
Comment #3 by clugdbug — 2010-04-09T13:39:13Z
Fixed DMD1.058 and 2.043.