[Issue 20162] Bug in optimization of remainder operation
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Aug 7 09:01:22 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=20162
Walter Bright <bugzilla at digitalmars.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bugzilla at digitalmars.com
--- Comment #1 from Walter Bright <bugzilla at digitalmars.com> ---
A smaller test case:
---
import core.stdc.stdio;
long f(long a) { return a; }
void main() {
foreach (i; 1 .. 2) {
foreach (j; 0 .. 2) {
printf("%d %d %llx\n", i,
((i != 0) ? -1 : +1),
f((i != 0) ? -1 : +1));
}
}
}
---
which prints:
1 -1 ffffffff
1 -1 ffffffff
--
More information about the Digitalmars-d-bugs
mailing list