Thread overview
[Issue 9303] New: ICE: (1235 in file 'glue.c') with property switch
Jan 12, 2013
Andrej Mitrovic
Jan 12, 2013
Andrej Mitrovic
Jan 14, 2013
yebblies
Jan 14, 2013
Andrej Mitrovic
[Issue 9303] ICE(glue.c) template mixin with property switch
Sep 17, 2013
Andrej Mitrovic
January 12, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9303

           Summary: ICE: (1235 in file 'glue.c') with property switch
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: ice
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: andrej.mitrovich@gmail.com


--- Comment #0 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2013-01-12 10:40:22 PST ---
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.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 12, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9303



--- Comment #1 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2013-01-12 10:44:39 PST ---
(In reply to comment #0)
>     mixin T!() X;

can be replaced with:

mixin T;

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 14, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9303


yebblies <yebblies@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |yebblies@gmail.com


--- Comment #2 from yebblies <yebblies@gmail.com> 2013-01-15 00:38:51 EST ---
Doesn't happen for me win32+2.062

DMD v2.062 DEBUG
testx.d(11): Error: mixin testx.main.T!() error instantiating

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 14, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9303



--- Comment #3 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2013-01-14 07:55:30 PST ---
(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

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
September 17, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9303


Andrej Mitrovic <andrej.mitrovich@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WORKSFORME


--- Comment #4 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2013-09-17 15:30:58 PDT ---
Seems to be fixed in 2.063.2.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------