Bug 854 – TypeTuple in anonymous delegate causes ice in glue.c

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
All
Creation time
2007-01-18T03:24:00Z
Last change time
2014-02-15T13:13:29Z
Keywords
ice-on-valid-code, patch
Assigned to
bugzilla
Creator
daniel.keep+d.puremagic.com

Attachments

IDFilenameSummaryContent-TypeSize
300bug-854.patchPatch which fixes this for LDC.text/plain1166

Comments

Comment #0 by daniel.keep+d.puremagic.com — 2007-01-18T03:24:06Z
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]; }; }
Comment #1 by thomas-dloop — 2007-02-23T16:36:01Z
Comment #2 by dhasenan — 2007-09-09T16:26:10Z
*** Bug 1214 has been marked as a duplicate of this bug. ***
Comment #3 by fvbommel — 2009-03-29T17:49:01Z
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)
Comment #4 by fvbommel — 2009-03-29T17:49:49Z
Created attachment 300 Patch which fixes this for LDC.
Comment #5 by fvbommel — 2009-03-30T07:29:55Z
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.
Comment #6 by bugzilla — 2009-06-20T23:09:05Z
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).
Comment #7 by bugzilla — 2009-07-09T02:53:34Z
Fixed dmd 1.046