Bug 2645 – dmd 2.023 crashes on this (wrong) code

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Linux
Creation time
2009-02-05T01:08:00Z
Last change time
2015-06-09T01:21:00Z
Assigned to
bugzilla
Creator
ace17

Comments

Comment #0 by ace17 — 2009-02-05T01:08:47Z
// The following code causes a segmentation fault. import std.stdio; import std.string; struct S { int a, b; } invariant S[4] tab; void f() { int i= 0; writefln(tab[i]); }
Comment #1 by clugdbug — 2009-05-06T08:22:40Z
Works for me in D2.029. (After changing writefln->writeln(tab[i]);, or to writefln("%s", tab[i]); ) I suspect this is a duplicate of the segfault bugs fixed in 2.028/2.029.