Bug creation and email sending has been disabled, file new bugs at gcc.gnu.org/bugzilla
Bug 225 - ICE when mixed in non-static member declaration depends on other members.
Summary: ICE when mixed in non-static member declaration depends on other members.
Status: RESOLVED FIXED
Alias: None
Product: GDC
Classification: Unclassified
Component: gdc (show other bugs)
Version: 5.x
Hardware: All All
: --- minor
Assignee: Iain Buclaw
URL:
Depends on:
Blocks:
 
Reported: 2016-05-17 18:08 CEST by art.08.09
Modified: 2016-06-08 06:34 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 2016-05-17 18:08:59 CEST
Arguably this is invalid code (depending on how one treats accessing unfinished declarations) and should be caught by the FE. But it is not caught, and, as the ICE happens in gdc-land, I'll report it here, JIC it's a symptom of a /real/ bug, and not only a UI issue.


   struct U {
      int a;
      mixin(`enum B { ` ~ U.tupleof[0].stringof ~ ` }`);
      mixin(`B b;`);
   }


->

gdcbugicemix.d:1:0: internal compiler error: in layout_aggregate_type, at d/d-codegen.cc:4480
 
 ^
0x7631ef layout_aggregate_type(AggregateDeclaration*, tree_node*, AggregateDeclaration*)
	../../gcc/d/d-codegen.cc:4480
0x78ad27 TypeVisitor::visit(TypeStruct*)
	../../gcc/d/types.cc:262
0x78aa1d build_ctype(Type*)
	../../gcc/d/types.cc:499
0x758252 AggregateDeclaration::toInitializer()
	../../gcc/d/d-decls.cc:701
0x767a50 StructDeclaration::toObjFile()
	../../gcc/d/d-objfile.cc:238
0x76a9d4 Module::genobjfile(bool)
	../../gcc/d/d-objfile.cc:1424
0x756600 d_parse_file()
	../../gcc/d/d-lang.cc:1211
Please submit a full bug report,
Comment 1 Iain Buclaw 2016-05-17 21:17:48 CEST
Looks like it's fixed in 2.068.  Too which the merge is being dealt with.
Comment 2 Iain Buclaw 2016-06-08 06:34:25 CEST
This would be fixed as 2.068 is now in master.