D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 1897 - ICE(template.c) with tuple delegate
Summary: ICE(template.c) with tuple delegate
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D1 (retired)
Hardware: x86 All
: P2 normal
Assignee: No Owner
URL:
Keywords: ice-on-valid-code, patch
Depends on:
Blocks:
 
Reported: 2008-03-07 12:05 UTC by Russ Lewis
Modified: 2014-04-18 09:12 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Russ Lewis 2008-03-07 12:05:08 UTC
dmd 2.012, Linux (Fedora Core 6, x86_64)

I'm not sure exactly what the specific problem is, but I'm suspicious of "TPL[0..n]".

BEGIN CODE
  void delegate() baz(int n, TPL...)(void function(TPL) func,TPL[0..n] args)
  {}

  void foo()
  {
    void delegate() tmp = baz!(2, bool,void*)(&bar, false,null);
  }

  void bar(bool isStruct, void *dummy)
  {}
END CODE
Comment 1 Don 2009-04-02 10:35:32 UTC
Works for me, Windows DMD 2.027.
Comment 2 Don 2009-05-14 06:52:32 UTC
Russ's test case now works on DMD2.029, but on 1.030, it ICEs:

Assertion failure: 'i < parameters->dim' on line 806 in file 'template.c'

Possibly related to Issue 2229.
Comment 3 Don 2009-09-12 11:51:09 UTC
My patch to bug 2229 fixes this.
Comment 4 Walter Bright 2009-10-13 13:50:34 UTC
Fixed dmd 1.049