Bug creation and email sending has been disabled, file new bugs at gcc.gnu.org/bugzilla
Bug 142 - ICE, FuncDeclaration::ctfeCompile(): Assertion `semanticRun == PASSsemantic3done' failed
Summary: ICE, FuncDeclaration::ctfeCompile(): Assertion `semanticRun == PASSsemantic3d...
Status: RESOLVED FIXED
Alias: None
Product: GDC
Classification: Unclassified
Component: gdc (show other bugs)
Version: 4.9.x
Hardware: All All
: --- normal
Assignee: Iain Buclaw
URL:
Depends on:
Blocks:
 
Reported: 2014-07-20 20:19 CEST by art.08.09
Modified: 2014-07-21 10:29 CEST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description art.08.09 2014-07-20 20:19:44 CEST
import gcc.attribute;
   @attribute("noinline") int g()() { return 42; }
   void main() {
      enum fails = g();
   }

fails to compile:

cc1d: ../../gcc/d/dfrontend/interpret.c:672: void FuncDeclaration::ctfeCompile(): Assertion `semanticRun == PASSsemantic3done' failed.
/sw/x64/d49-2.065/include/d/4.9.1/gcc/attribute.di:28: internal compiler error: Aborted
0xa81fef crash_signal
	../../gcc/toplev.c:337
0x605137 FuncDeclaration::ctfeCompile()
	../../gcc/d/dfrontend/interpret.c:672
0x60589c FuncDeclaration::interpret(InterState*, Array<Expression*>*, Expression*)
	../../gcc/d/dfrontend/interpret.c:796
0x612cf7 FuncDeclaration::interpret(InterState*, Array<Expression*>*, Expression*)
	../../gcc/d/dfrontend/interpret.c:791
0x612cf7 CallExp::interpret(InterState*, CtfeGoal)
	../../gcc/d/dfrontend/interpret.c:4955
0x606dd2 Expression::ctfeInterpret()
	../../gcc/d/dfrontend/interpret.c:709
0x6a03af build_attributes
	../../gcc/d/d-codegen.cc:851
0x6acd9a setup_symbol_storage(Dsymbol*, tree_node*, bool)
	../../gcc/d/d-objfile.cc:1747
0x69e9ac FuncDeclaration::toSymbol()
	../../gcc/d/d-decls.cc:448
0x6aedef FuncDeclaration::toObjFile(int)
	../../gcc/d/d-objfile.cc:1104
0x6abf9e TemplateInstance::toObjFile(int)
	../../gcc/d/d-objfile.cc:877
0x6b079e Module::genobjfile(int)
	../../gcc/d/d-objfile.cc:1427
0x69d710 d_parse_file()
	../../gcc/d/d-lang.cc:1139
Please submit a full bug report,
Comment 1 Iain Buclaw 2014-07-21 10:23:12 CEST
This is a result of sending instantiated symbols from gcc.attribute to object.


Shouldn't do this, that module is purely artificial.