digitalmars.D.bugs - [Issue 2216] New: bad code generation for static arrays of zero length static arrays
- d-bugmail puremagic.com (22/22) Jul 10 2008 http://d.puremagic.com/issues/show_bug.cgi?id=2216
- d-bugmail puremagic.com (8/8) Jul 11 2008 http://d.puremagic.com/issues/show_bug.cgi?id=2216
- d-bugmail puremagic.com (9/9) Aug 14 2008 http://d.puremagic.com/issues/show_bug.cgi?id=2216
http://d.puremagic.com/issues/show_bug.cgi?id=2216 Summary: bad code generation for static arrays of zero length static arrays Product: D Version: 1.029 Platform: PC OS/Version: Linux Status: NEW Keywords: wrong-code Severity: normal Priority: P2 Component: DMD AssignedTo: bugzilla digitalmars.com ReportedBy: tomas famolsen.dk simple test case: int[0][10] arr; printf("%u\n", &arr[9] - &arr[0]); Output: Floating point exeption The crash happens due to the pointer subtraction dividing by size 0: AST: (&arr[9] - &arr[0]) / 0 this should just print a 0. --
Jul 10 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2216 tomas famolsen.dk changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |trivial Marking as trivial. Just return zero if stride==0. --
Jul 11 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2216 bugzilla digitalmars.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED Fixed dmd 1.034 and 2.018 --
Aug 14 2008