Codegeneration bug (div/mod related) on i386
Original Reporter info from Mantis: Gorelkin
-
Reporter name: Sergei Gorelkin
Original Reporter info from Mantis: Gorelkin
- Reporter name: Sergei Gorelkin
Description:
While figuring out why #14902 (closed) works on x86_64 but fails on i386, I ended up in the attached example.
The modulus is apparently being optimized incorrectly.
The second writeln calculates its argument as int64 (using a call to fpc_mod_int64) and therefore produces the correct result.
Mantis conversion info:
- Mantis ID: 15015
- Platform: i386
- Version: 2.5.1
- Fixed in version: 2.4.2
- Fixed in revision: 15175 (#75b5b6c7)
- Monitored by: » Targion (Targion)