[Issue 3919] ICE(expression.c, 9944): * or / with typedef ireal
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Mar 10 23:56:01 PST 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3919
Don <clugdbug at yahoo.com.au> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |patch
CC| |clugdbug at yahoo.com.au
Summary|Assertion failure: '0' on |ICE(expression.c, 9944): *
|line 9944 in file |or / with typedef ireal
|'expression.c' |
--- Comment #1 from Don <clugdbug at yahoo.com.au> 2010-03-10 23:56:01 PST ---
Applies to D1 as well.
Reduced test case for test suite, for both this bug and the next one:
-------
typedef ireal BUG3919;
alias typeof(BUG3919.init*BUG3919.init) ICE3919;
alias typeof(BUG3919.init/BUG3919.init) ICE3920;
-------
Simple: It's not obtaining the base type before checking if it is an imaginary
type.
PATCH:
Expression.c MulExp::semantic, around line 9935.
Apply exactly the same to DivExp::semantic, around line 10003, to fix bug 3920.
if (!e1->isArrayOperand())
e1->checkArithmetic();
if (!e2->isArrayOperand())
e2->checkArithmetic();
if (type->isfloating())
- { Type *t1 = e1->type;
- Type *t2 = e2->type;
+ { Type *t1 = e1->type->toBasetype();
+ Type *t2 = e2->type->toBasetype();
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list