www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 854] New: TypeTuple in anonymous delegate causes ice in glue.c

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=854

           Summary: TypeTuple in anonymous delegate causes ice in glue.c
           Product: D
           Version: 1.00
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: daniel.keep+d.puremagic.com gmail.com


If you try to create an anonymous delegate with a TypeTuple in the argument
list, you get an ICE.

Steps to reproduce:

1) Attempt to compile code below with "dmd glue_gd_ice.d".

Actual result:

The compiler crashes with the following message:
"Assertion failure: '0' on line 700 in file 'glue.c'"

Expected result:

The code to compile, or at least display a meaningful error message.

Compiler: Digital Mars D Compiler v1.0, WinXP SP2.

Code to reproduce: (glue_dg_ice.d)

import std.typetuple;

void main()
{
    auto x = (uint a, uint b) { return a*b; };
    auto y = (TypeTuple!(uint,uint) ab) { return ab[0] * ab[1]; };
}


-- 
Jan 18 2007
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=854






The same message is triggered by 
http://d.puremagic.com/issues/show_bug.cgi?id=639

Added to DStress as
http://dstress.kuehne.cn/run/t/tuple_15_A.d
http://dstress.kuehne.cn/run/t/tuple_15_B.d


-- 
Feb 23 2007
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=854


dhasenan gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jrs7561 louisiana.edu





*** Bug 1214 has been marked as a duplicate of this bug. ***


-- 
Sep 09 2007
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=854


fvbommel wxs.nl changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fvbommel wxs.nl
           Keywords|                            |patch





I just fixed this bug in LDC, and I'm attaching a patch that makes the same
change to DMD.
I haven't been able to test this version because some files seem to be
missing...

(See the FIXME in the patch for something I'm not sure about)


-- 
Mar 29 2009
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=854






Created an attachment (id=300)
 --> (http://d.puremagic.com/issues/attachment.cgi?id=300&action=view)
Patch which fixes this for LDC.


-- 
Mar 29 2009
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=854






After some changes to DMD 1.041 to get it to compile on my machine, I managed
to verify that the attached patch fixes both the original example and the
dstress tests.


-- 
Mar 30 2009
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=854






23:09:05 PDT ---
This works in D2, the solution is to do the semantics on the parameter types at
the start of the semantic(). I've folded the changes to do this from D2 to D1
(for next update).

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 20 2009
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=854


Walter Bright <bugzilla digitalmars.com> changed:

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





02:53:34 PDT ---
Fixed dmd 1.046

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