www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 9208] New: [ICE](func.c line 1205) with auto return in recursive function

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

           Summary: [ICE](func.c line 1205) with auto return in recursive
                    function
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: bearophile_hugs eml.cc



import std.array: array;
struct Foo(T) { Foo* next; }
auto bar(T)(in Foo!T* x) {
    if (true) return [""];
    return array(bar(x.next));
}
void main () {
    bar!int(null);
}


DMD 2.061alpha gives:

Assertion failure: 'type == f' on line 1205 in file 'func.c'


Replacing "auto" with string[] the code compiles (despite a unrelated statement
is not reachable warning).

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 26 2012
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9208


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice, pull
           Platform|x86                         |All
         OS/Version|Windows                     |All



https://github.com/D-Programming-Language/dmd/pull/1410

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 26 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9208




Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/0e58a5ac9b87183c8ed396c0d570163bb0f6fdaf
fix Issue 9208 - [ICE](func.c line 1205) with auto return in recursive function

https://github.com/D-Programming-Language/dmd/commit/b07e16196afa0bacb6335d33812e2ebb6a0fdfa6


Issue 9208 - [ICE](func.c line 1205) with auto return in recursive function

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 03 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9208


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla digitalmars.com
         Resolution|                            |FIXED


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