November 03, 2014
https://issues.dlang.org/show_bug.cgi?id=13675

          Issue ID: 13675
           Summary: enum type used with template causes compiler to
                    segfault
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: regression
          Priority: P1
         Component: DMD
          Assignee: nobody@puremagic.com
          Reporter: alanb@ucora.com

This used to work OK with dmd_2.064.2 amd64
The compiler now segfaults with dmd 2.066.1 amd64

enum S; // <- problem point

bool foo( T : S )()
{
    return false;
}

void bar()
{
  if (foo!S)
  {}

}

int main()
{
  bar();
  return 0;
}

$ dmd main.d
Segmentation fault

Other user defined types such as struct and class will work and enum with user defined values will work too, eg enum S {a,b,c}.

--