[Issue 4465] ICE(symbol.c): immutable type inference with ^^2
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Aug 13 12:15:36 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4465
Don <clugdbug at yahoo.com.au> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |patch
--- Comment #3 from Don <clugdbug at yahoo.com.au> 2010-08-13 12:15:34 PDT ---
One option would be to change PowExp to stop using CommaExp, but I think that
lowering involving comma expressions is such a useful internal feature that
it's worth supporting.
---------------
PATCH:
optimize.c, fromConstInitializer(), line 142.
e = expandVar(result, v);
if (e)
{
+ // If it is a comma expression involving a declaration, we mustn't
+ // perform a copy -- we'd get two declarations of the same
variable.
+ // See bugzilla 4465.
+ if (e->op == TOKcomma && ((CommaExp *)e)->e1->op ==
TOKdeclaration)
+ e= e1;
+ else
if (e->type != e1->type && e1->type && e1->type->ty != Tident)
{ // Type 'paint' operation
e = e->copy();
--
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