www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 4963] New: ICE(type.c:320) for struct append where T.sizeof < 3

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

           Summary: ICE(type.c:320) for struct append where T.sizeof < 3
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: kevinbealer gmail.com



PDT ---
----- symptom ----

dmd  -ofsolver solver.d
Internal error: ../ztc/type.c 320

----- conditions -----

ICE occurs in type.c line 320 during array append operation of structs.

Error only occurs when all these conditions are met:

1. One object must be a list, the other a single object.
2. Value.sizeof must be < 3.
3. The single value is returned from a function or method.

----- solver.d -----

struct Value {
    //int a; // does not produce error
    byte a;  // produces error (also, short would produce an error)
};

Value single()
{
    Value v;
    return v;
}

int main(string[] args)
{
    Value[] list;
    Value single2;

    Value[] buffer = single() ~ list; // error
    Value[] buffer2 = single2 ~ list; // not an error

    return 0;
}

-----
Kevin

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 30 2010
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4963




PDT ---
This is on DMD 2.048.

Kevin

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 30 2010
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4963


Brad Roberts <braddr puremagic.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Platform|x86_64                      |x86



---
Mass migration of bugs marked as x86-64 to just x86.  The platform run on isn't
what's relevant, it's if the app is a 32 or 64 bit app.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 06 2011
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4963


yebblies <yebblies gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch
                 CC|                            |yebblies gmail.com
           Platform|x86                         |All
         OS/Version|Linux                       |All



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

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


Walter Bright <bugzilla digitalmars.com> changed:

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



14:08:43 PDT ---
https://github.com/D-Programming-Language/dmd/commit/31fcbc12339e7d539aa29ad91e9b175f6631e20b

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

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