www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 9781] New: -inline will cause backend ICE

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

           Summary: -inline will cause backend ICE
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: ice
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: k.hara.pg gmail.com


--- Comment #0 from Kenji Hara <k.hara.pg gmail.com> 2013-03-21 18:55:07 PDT ---
void main()
{
    int foo(int[4] x)
    {
        return x[1] * x[2];
    }
    int[] xs = [0,1,2,3];
    foo(xs[0 .. 4]);
}


$ dmd -inline -run test
DMD v2.063 DEBUG
tym = x25
el:0034D6AC cnt=0 cs=0 *  TYint 0034D16C 0034D4B4
 el:0034D16C cnt=0 cs=0 const  TYvoid 1L
 el:0034D4B4 cnt=0 cs=0 const  TYvoid 1L
Internal error: backend\evalu8.c 1222

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 21 2013
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9781


Martin Nowak <code dawg.eu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |code dawg.eu


--- Comment #1 from Martin Nowak <code dawg.eu> 2013-03-23 01:47:09 PDT ---
Apparently the left and the right elem have the wrong type and value.

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



--- Comment #2 from Martin Nowak <code dawg.eu> 2013-04-08 17:23:43 PDT ---
cat > bug.d << CODE
int foo9781(int[1] x)
{
    return x[0] * x[0];
}

void test9781()
{
    foo9781([7]);
}
CODE

dmd -c -inline bug.d

Happens with v2.062 too.

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


Martin Nowak <code dawg.eu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull


--- Comment #3 from Martin Nowak <code dawg.eu> 2013-04-08 21:46:10 PDT ---
https://github.com/D-Programming-Language/dmd/pull/1874

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



--- Comment #4 from github-bugzilla puremagic.com 2013-04-08 22:11:39 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/4ae287b83ac939a767bbff392a8e931684f4827b
fix Issue 9781 - -inline will cause backend ICE

- this rewrite created a const elem with type TYvoid
  which caused the backend assert in evalu8

https://github.com/D-Programming-Language/dmd/commit/7bf44a9a3a52ae61142307fd71d69f6708020337
Merge pull request #1874 from dawgfoto/fix9781

fix Issue 9781 - -inline will cause backend ICE

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


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


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