[Issue 10198] New: CTFE: Wrong code for multi-dimensional block assignment
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed May 29 00:45:36 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10198
Summary: CTFE: Wrong code for multi-dimensional block
assignment
Product: D
Version: D1 & D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: clugdbug at yahoo.com.au
--- Comment #0 from Don <clugdbug at yahoo.com.au> 2013-05-29 00:45:35 PDT ---
This code fails. Currently only val[0][] is initialized, the reset remains with
the default initializer.
---
struct MultiBlock {
int val[3][4];
}
int multiblockTest()
{
MultiBlock pp = MultiBlock(67);
assert(pp.val[2][3] == 67);
assert(pp.val[1][3] == 67);
return 1;
}
static assert(multiblockTest());
---
Additionally, the wrong behaviour is coded into a test in the test suite, in
test42.d.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list