http://d.puremagic.com/issues/show_bug.cgi?id=2851
Summary: Segfault using C-style struct initializer with too few arguments Product: D Version: 2.027 Platform: PC OS/Version: Windows Status: NEW Keywords: accepts-invalid, ice-on-invalid-code Severity: normal Priority: P2 Component: DMD AssignedTo: bugzi...@digitalmars.com ReportedBy: clugd...@yahoo.com.au The bug is that it doesn't check that the number of members in the initializer is correct. It's silently accepted as long as you don't access an uninitialised member; if you do, the compiler segfaults. ---- struct Test{ int foo; } enum Test test = {}; enum q = test.foo; --