Bug 5343 – dmd crashes by the use of template with -g compiler switch

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P5
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Windows
Creation time
2010-12-11T05:07:00Z
Last change time
2010-12-12T02:55:23Z
Keywords
ice-on-valid-code
Assigned to
nobody
Creator
zan77137

Comments

Comment #0 by zan77137 — 2010-12-11T05:07:40Z
This code crashes dmd at trunk(r795): --------------- module main; import std.typecons; struct S(E) { immutable E x; // Workaround: Remove immutable. } enum A{a,b,c} // Workaround: alias int A; alias Tuple!(A) TA; // Workaround: Remove this line. alias S!(A) SA; // Workaround: Exchange of declaration order with TA. void main() { } --------------- Result: $ dmd -g -run main (dmd crashes!)
Comment #1 by clugdbug — 2010-12-11T08:40:03Z
Worked on DMD2.050.
Comment #2 by clugdbug — 2010-12-11T21:46:31Z
Reduces test case: struct Tuple(Specs...) { Specs[0] field; } struct S(E) { immutable E x; // Workaround: Remove immutable. } enum A{a,b,c} // Workaround: alias int A; alias Tuple!(A) TA; // Workaround: Remove this line. alias S!(A) SA; // Workaround: Exchange of declaration order with TA. void main() { }
Comment #3 by clugdbug — 2010-12-11T21:57:14Z
Seems to have just been fixed in svn 798.
Comment #4 by bugzilla — 2010-12-11T23:11:19Z
Right, it doesn't happen with the latest source.
Comment #5 by zan77137 — 2010-12-12T02:55:23Z
Because this bug was enbug and this must be fixed by next release, I raised importance. Thanks for the swift response.