[Issue 9539] New: Regression (2.061): Wrong-code on static array pointer
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Feb 19 14:13:48 PST 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9539
Summary: Regression (2.061): Wrong-code on static array pointer
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Keywords: wrong-code
Severity: regression
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: andrej.mitrovich at gmail.com
--- Comment #0 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2013-02-19 14:13:47 PST ---
void f(int** ptr)
{
assert(**ptr == 10);
}
void main()
{
int* i = new int;
*i = 10;
int*[1] x = [i];
f(&x[0]);
}
2.060:
$ dmd test.d
>
2.061
$ dmd test.d
> core.exception.AssertError at test(5): Assertion failure
2.062
$ dmd test.d
> core.exception.AssertError at test(5): Assertion failure
Same thing happens when you use 'x.ptr'.
--
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