Bug 1187 – Segfault with syntax error in two-level mixin.

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
All
Creation time
2007-04-24T13:22:00Z
Last change time
2014-02-16T15:24:17Z
Keywords
diagnostic, ice-on-invalid-code, patch
Assigned to
bugzilla
Creator
clugdbug

Comments

Comment #0 by clugdbug — 2007-04-24T13:22:14Z
Several kinds of syntax error seem to do it. ----------- void a(){ mixin(`mixin`); } ------------ and the next one doesn't segfault, but has no line number (identifier expected, not EOF): mixin(`mixin`);
Comment #1 by thomas-dloop — 2007-04-27T12:38:21Z
Comment #2 by davidl — 2007-11-09T19:38:35Z
a patch: expression.c:4576 DeclarationExp::DeclarationExp(Loc loc, Dsymbol *declaration) : Expression(loc, TOKdeclaration, sizeof(DeclarationExp)) { assert(declaration); //no null declaration allowed this->declaration = declaration; } parse.c:2550 } Dsymbol *d = parseMixin(); if (d) s = new DeclarationStatement(loc, d); break;
Comment #3 by clugdbug — 2008-07-09T07:16:28Z
Fixed DMD1.032
Comment #4 by bugzilla — 2008-07-09T22:38:52Z
Fixed dmd 1.032 and 2.016