Thread overview | ||||||||
---|---|---|---|---|---|---|---|---|
|
November 10, 2009 [Issue 3493] New: Segfault(cast.c) Forward reference with type inference, D1 only. | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=3493 Summary: Segfault(cast.c) Forward reference with type inference, D1 only. Product: D Version: 1.050 Platform: Other OS/Version: Windows Status: NEW Keywords: ice-on-valid-code Severity: normal Priority: P2 Component: DMD AssignedTo: nobody@puremagic.com ReportedBy: clugdbug@yahoo.com.au --- Comment #0 from Don <clugdbug@yahoo.com.au> 2009-11-10 02:03:37 PST --- This is the second bug reported in bug 2080. const bar = foo; const int * foo = null; -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
November 18, 2009 [Issue 3493] Segfault(cast.c) Forward reference with type inference, D1 only. | ||||
---|---|---|---|---|
| ||||
Posted in reply to Don | http://d.puremagic.com/issues/show_bug.cgi?id=3493 Don <clugdbug@yahoo.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch --- Comment #1 from Don <clugdbug@yahoo.com.au> 2009-11-17 23:55:05 PST --- This doesn't segfault in D2 because in expression.c, VarExp::semantic(), line 4152, the initializer part is commented out. VarDeclaration *v = var->isVarDeclaration(); if (v) { +#if 0 if ((v->isConst() || v->isInvariant()) && type->toBasetype()->ty != Tsarray && v->init) { ExpInitializer *ei = v->init->isExpInitializer(); if (ei) { //ei->exp->implicitCastTo(sc, type)->print(); return ei->exp->implicitCastTo(sc, type); } } +#endif v->checkNestedReference(sc, loc); #if DMDV2 Doing the same thing in D1 fixes this bug, and the DMD test suite still passes. However I'm not sure why the code above is unnecessary. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
August 09, 2010 [Issue 3493] Segfault(cast.c) Forward reference with type inference, D1 only. | ||||
---|---|---|---|---|
| ||||
Posted in reply to Don | http://d.puremagic.com/issues/show_bug.cgi?id=3493 --- Comment #2 from Don <clugdbug@yahoo.com.au> 2010-08-09 02:37:30 PDT --- Here's a more minimal patch. It shouldn't be implicitly casting the initializer, if it hasn't run semantic on it yet. expression.c, VarExp::semantic(), line 3955. if (v) { if (v->isConst() && v->type && type->toBasetype()->ty != Tsarray && v->init) { ExpInitializer *ei = v->init->isExpInitializer(); - if (ei) + if (ei && ei->exp->type) { + assert(ei->exp->type); //ei->exp->implicitCastTo(sc, type)->print(); return ei->exp->implicitCastTo(sc, type); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
August 28, 2010 [Issue 3493] Segfault(cast.c) Forward reference with type inference, D1 only. | ||||
---|---|---|---|---|
| ||||
Posted in reply to Don | http://d.puremagic.com/issues/show_bug.cgi?id=3493 Walter Bright <bugzilla@digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |bugzilla@digitalmars.com Resolution| |FIXED --- Comment #3 from Walter Bright <bugzilla@digitalmars.com> 2010-08-27 22:11:46 PDT --- http://www.dsource.org/projects/dmd/changeset/637 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
August 30, 2010 [Issue 3493] Segfault(cast.c) Forward reference with type inference, D1 only. | ||||
---|---|---|---|---|
| ||||
Posted in reply to Don | http://d.puremagic.com/issues/show_bug.cgi?id=3493 Walter Bright <bugzilla@digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED | --- Comment #4 from Walter Bright <bugzilla@digitalmars.com> 2010-08-30 13:26:04 PDT --- Undoing the patch for 190 also breaks this. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
November 15, 2010 [Issue 3493] Segfault(cast.c) Forward reference with type inference, D1 only. | ||||
---|---|---|---|---|
| ||||
Posted in reply to Don | http://d.puremagic.com/issues/show_bug.cgi?id=3493 Don <clugdbug@yahoo.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution| |FIXED --- Comment #5 from Don <clugdbug@yahoo.com.au> 2010-11-15 00:16:29 PST --- Fixed dmd 1.064. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation