Bug 15690 – [ICE] backend/symbol.c 1032

Status
RESOLVED
Resolution
FIXED
Severity
critical
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Windows
Creation time
2016-02-16T11:03:16Z
Last change time
2020-03-21T03:56:33Z
Keywords
ice
Assigned to
No Owner
Creator
ponce

Comments

Comment #0 by aliloko — 2016-02-16T11:03:16Z
DMD 2.070 crash with the evil following construct: ----------------- import std.stdio; import std.typecons; import std.range; void main() { int id = 0; switch (id) { static immutable myArray = iota(100).array; foreach(i; myArray) { case i: writefln("i: %d", i); break; } default: ; } } ----------------- http://dpaste.dzfl.pl/4acbf36da8a4
Comment #1 by b2.temp — 2017-01-15T23:05:58Z
This case is deprecated now, should this issue be closed then ?
Comment #2 by hsteoh — 2018-06-12T22:57:06Z
Tested on latest git master (153db26c226d84a27a926810025b91eb6583849c), confirmed that this no longer crashes the compiler. Compiler output: ------ test.d(20): Deprecation: use { } for an empty statement, not ; test.d(15): Error: case variable i declared at test.d(13) cannot be declared in switch body ------