[Issue 12164] Function returning ptrdiff_t.min in 64-bit returning 0 when -O is set.
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Mar 6 23:49:07 PST 2014
https://d.puremagic.com/issues/show_bug.cgi?id=12164
--- Comment #3 from yebblies <yebblies at gmail.com> 2014-03-07 18:49:05 EST ---
Reduced:
ptrdiff_t compare(A* rhsPA, A* zis)
{
if (*rhsPA == *zis)
return 0;
return ptrdiff_t.min;
}
struct A
{
int a;
}
void main()
{
auto a = A(3);
auto b = A(4);
assert(!compare(&a, &b));
}
The backend tried to emit OPmemcmp and screws it up somehow, probably missing a
REX_W prefix or two.
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list