Bug creation and email sending has been disabled, file new bugs at gcc.gnu.org/bugzilla

Bug 41

Summary: gdmd commit suicide when using -femit-templates
Product: GDC Reporter: deadalnix <deadalnix>
Component: gdcAssignee: Iain Buclaw <ibuclaw>
Status: RESOLVED FIXED    
Severity: normal    
Priority: ---    
Version: 4.8.x   
Hardware: x86_64   
OS: Linux   

Description deadalnix 2013-03-12 16:34:47 CET
a.d :
// Empty

b.d :
module b;

import std.range;

class A {
}

void foo(A a) {
	a.repeat;
}

run : gdmd *.d -femit-templates

/opt/gdc/include/d/4.8.0/std/range.d: In member function 'front':
/opt/gdc/include/d/4.8.0/std/range.d:3681: internal compiler error: Segmentation fault
0x8ca1df crash_signal
	../../gcc-4.8-20130224/gcc/toplev.c:332
0x61b916 FuncDeclaration::toObjFile(int)
	../../gcc-4.8-20130224/gcc/d/d-glue.cc:196
0x6017ef AttribDeclaration::toObjFile(int)
	../../gcc-4.8-20130224/gcc/d/dfrontend/toobj.c:1432
0x600fef StructDeclaration::toObjFile(int)
	../../gcc-4.8-20130224/gcc/d/dfrontend/toobj.c:1152
0x6019ce TemplateInstance::toObjFile(int)
	../../gcc-4.8-20130224/gcc/d/dfrontend/toobj.c:1499
0x61c227 Module::genobjfile(int)
	../../gcc-4.8-20130224/gcc/d/d-glue.cc:370
0x60cd9f d_parse_file()
	../../gcc-4.8-20130224/gcc/d/d-lang.cc:1081
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gdcproject.org/bugzilla> for instructions.