Bug 13675 – enum type used with template causes compiler to segfault
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-11-03T23:09:00Z
Last change time
2015-02-18T03:39:35Z
Keywords
ice, pull
Assigned to
nobody
Creator
alanb
Comments
Comment #0 by alanb — 2014-11-03T23:09:20Z
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}.