Re: Bad codegen for comparison with postfix increment

2024-05-09 Thread Iain Buclaw via D.gnu
On Thursday, 9 May 2024 at 18:24:12 UTC, Iain Buclaw wrote: On Wednesday, 8 May 2024 at 14:26:25 UTC, Paul Backus wrote: When the following program is compiled with GDC 14.1, the assertion fails: void main() { int d = 42; bool o = d > d++; assert(o == false); }

Re: Bad codegen for comparison with postfix increment

2024-05-09 Thread Iain Buclaw via D.gnu
On Wednesday, 8 May 2024 at 14:26:25 UTC, Paul Backus wrote: When the following program is compiled with GDC 14.1, the assertion fails: void main() { int d = 42; bool o = d > d++; assert(o == false); } (Godbolt: https://d.godbolt.org/z/e63xbb9Td) The assertion