Bug 9303 – ICE(glue.c) template mixin with property switch

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-01-12T10:40:00Z
Last change time
2013-09-17T15:30:58Z
Keywords
ice
Assigned to
nobody
Creator
andrej.mitrovich

Comments

Comment #0 by andrej.mitrovich — 2013-01-12T10:40:22Z
This is invalid code, but it ICEs: mixin template T() { string fact() { return test.main.T!().fact(); } } void main() { mixin T!() X; } $ dmd -property test.d It only ICEs with the -property flag.
Comment #1 by andrej.mitrovich — 2013-01-12T10:44:39Z
(In reply to comment #0) > mixin T!() X; can be replaced with: mixin T;
Comment #2 by yebblies — 2013-01-14T05:38:51Z
Doesn't happen for me win32+2.062 DMD v2.062 DEBUG testx.d(11): Error: mixin testx.main.T!() error instantiating
Comment #3 by andrej.mitrovich — 2013-01-14T07:55:30Z
(In reply to comment #2) > Doesn't happen for me win32+2.062 > > DMD v2.062 DEBUG > testx.d(11): Error: mixin testx.main.T!() error instantiating commit 67ca915e3d89db564217bd6452de6c6799c01f6c $ dmd -property test.d > DMD v2.062 DEBUG > ty = 35, '_error_' And a dialog box: --------------------------- dmd.exe - Application Error --------------------------- The instruction at "0x004024ce" referenced memory at "0x00000000". The memory could not be "written". Stack trace: 0012f518 004d1fef DMD!halt+0x5(...) 0012f58c 004da582 DMD!Type::totym()+0x38f(...) 0012f5b0 004d981e DMD!IntegerExp::toElem(IRState*)+0x1e 0012f5dc 004d568d DMD!Expression::toElemDtor(IRState*)+0x2f 0012f65c 004d57ea DMD!ReturnStatement::toIR(IRState*)+0x1e3 0012f688 004d1843 DMD!CompoundStatement::toIR(IRState*)+0x71 0012f884 004d1b86 DMD!FuncDeclaration::toObjFile(int )+0xd62 0012fa80 004d057d DMD!FuncDeclaration::toObjFile(int )+0x10a5 0012fb2c 004050b1 DMD!Module::genobjfile(int )+0x28f 0012ff44 0040546b DMD!tryMain+0x2ba2 0012ff80 005651f5 DMD!main+0x43 0012ffc0 7c817067 DMD!mainCRTStartup+0xa9 0012fff0 00000000 0x7c817067
Comment #4 by andrej.mitrovich — 2013-09-17T15:30:58Z
Seems to be fixed in 2.063.2.