[Issue 10243] New: [CTFE] Wrong-code on passing dereferenced array pointer by ref
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Jun 2 08:25:36 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10243
Summary: [CTFE] Wrong-code on passing dereferenced array
pointer by ref
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Keywords: CTFE, wrong-code
Severity: major
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: verylonglogin.reg at gmail.com
--- Comment #0 from Denis Shelomovskij <verylonglogin.reg at gmail.com> 2013-06-02 19:25:35 MSD ---
---
void f(ref ubyte n)
{ n = 1; }
void test()
{
ubyte[1] arr;
f(*arr.ptr);
assert(arr == [1]);
}
void main()
{
test();
static assert((test(), true)); // fails
}
---
--
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