Bug 4963 – ICE(type.c:320) for struct append where T.sizeof < 3
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2010-09-30T22:28:00Z
Last change time
2011-07-03T14:08:43Z
Keywords
ice-on-valid-code, patch
Assigned to
nobody
Creator
kevinbealer
Comments
Comment #0 by kevinbealer — 2010-09-30T22:28:48Z
----- 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
Comment #1 by kevinbealer — 2010-09-30T22:29:23Z
This is on DMD 2.048.
Kevin
Comment #2 by braddr — 2011-02-06T15:39:58Z
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.