Bug 1061 – "asm inc [;" segfaults compiler.

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

Attachments

IDFilenameSummaryContent-TypeSize
3071061_asm-eof.diffCheck for TOKeof.text/plain454

Comments

Comment #0 by clugdbug — 2007-03-14T06:44:22Z
In fact any mismatched [ will do it. -------------------- void main() { asm { inc [; } }
Comment #1 by thomas-dloop — 2007-03-29T14:07:26Z
Comment #2 by clugdbug — 2007-12-03T02:37:26Z
*** Bug 1710 has been marked as a duplicate of this bug. ***
Comment #3 by bugs-d — 2009-03-30T01:29:54Z
Created attachment 307 Check for TOKeof. This is crashing because it runs out of tokens, and tries to print the unexpected character as an error message - but there is no character, it's out of tokens. The attached patch checks for TOKeof before spitting out the "unexpected character" error, and says that character is ";" (which is must always be, since that's the only way an AsmStatement is created.) -[Unknown]
Comment #4 by clugdbug — 2009-05-14T01:31:28Z
Fixed DMD2.030 and 1.045.