Bug 4108 – ICE(cod2.c): zero-length static array in function call

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2010-04-21T13:45:00Z
Last change time
2014-02-15T02:45:54Z
Keywords
ice-on-invalid-code
Assigned to
nobody
Creator
bearophile_hugs

Comments

Comment #0 by bearophile_hugs — 2010-04-21T13:45:12Z
This is D2 code: void foo(T)(T) { bool b = __traits(isStaticArray, T); } void main() { int[0] arr; foo(arr); } dmd 2.043 gives at runtime: Internal error: ..\ztc\cod2.c 4333
Comment #1 by bugzilla — 2010-04-27T22:37:47Z
The same error is produced by: void foo(int[0]); void main() { int[0] arr; foo(arr); } It has nothing to do with __traits.
Comment #2 by bugzilla — 2010-04-28T15:12:54Z
changeset 459
Comment #3 by clugdbug — 2010-05-05T19:11:45Z
Fixed DMD2.044