www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 10493] New: ICE with -inline, depending on order of source files

http://d.puremagic.com/issues/show_bug.cgi?id=10493

           Summary: ICE with -inline, depending on order of source files
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: peterneubauer2 gmail.com


--- Comment #0 from Peter Neubauer <peterneubauer2 gmail.com> 2013-06-28
06:40:31 PDT ---
Using DMD 2.063.2, tested on Arch Linux (x86_64)

---
cat > a.d <<CODE
import std.array;
CODE
cat > b.d <<CODE
import std.algorithm : map;

void foo (int a)
{
  [0].map!(b => a);
}
CODE
dmd -inline a.d b.d
---
b.d(3): Error: function b.foo compiler error, parameter 'a', bugzilla 2962?
dmd: glue.c:817: virtual void FuncDeclaration::toObjFile(int): Assertion `0'
failed.
Aborted (core dumped)
---

Additional details:
- Only crashes using -inline and a.d before b.d
- a.d has to import std.anything for the error to appear
- I could only reproduce it using std.map, not just any template function

May be related to bug# 8524 and/or bug# 9399 (which is supposed to be fixed).

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