Summary: Segfault using C-style struct initializer with too few
           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

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 =;


Reply via email to