Bug 21911 – dmd compiler segfault with std.container array, templated struct, and static if

Status
RESOLVED
Resolution
WORKSFORME
Severity
critical
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Windows
Creation time
2021-05-10T18:20:31Z
Last change time
2023-04-05T11:32:16Z
Assigned to
No Owner
Creator
cc

Comments

Comment #0 by ofsfmq+2y1kh9wla11eg — 2021-05-10T18:20:31Z
DMD32 D Compiler v2.096.0-dirty (Windows 10 x64) Compiler crashes with "Segmentation fault" with the following code. import std.container.array; struct Foo(T) { struct Bar { T value; } Array!Bar bar; this(string str) { static if (is(T == string)) {} // also fails with enum, float, etc } } void main() { Foo!int f; }
Comment #1 by razvan.nitu1305 — 2023-04-05T11:32:16Z
I cannot reproduce this with latest master.