www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 5844] New: DMD crash on infinite-recursive variadic template pure auto function

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

           Summary: DMD crash on infinite-recursive variadic template pure
                    auto function
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Mac OS X
            Status: NEW
          Keywords: ice-on-invalid-code
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: kennytm gmail.com



The following program caused a 'Bus Error' in DMD when compiling:

----------------------
pure auto j(T...)(int) {
    j!T(0);
}

void main() {
    j!int(1);
}
----------------------

The 'Bus Error' doesn't happen when either 'pure' is removed, or 'auto' is
changed to 'void'. 

The 'Bus Error' does not happen at least on 2.048. It simply writes

x.d(2): Error: forward reference to inferred return type of function call j(0)
x.d(6): Error: template instance x.j!(int) error instantiating

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 14 2011
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5844


Don <clugdbug yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |clugdbug yahoo.com.au
         Resolution|                            |DUPLICATE



The patch in 5936 also fixes this.

*** This issue has been marked as a duplicate of issue 5936 ***

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