Array enumeration bug with opmisation level 2 for target 80386
Original Reporter info from Mantis: Nitorami
-
Reporter name:
Original Reporter info from Mantis: Nitorami
- Reporter name:
Description:
With optimization level 2 and optimization target 80386, an array enumerator does not always work correctly and may cause an acess violation.
Marcov confirmed same issue with trunk, see http://forum.lazarus.freepascal.org/index.php/topic,42044.0.html
Steps to reproduce:
Compile and run attached code with FPC3.0.4, win32, and the parameters -O2 -Op80386 -Mdelphi (or -Mobjfpc). The program should print
10
10
10
10
but instead does
10
10
0
Runtime error 204 at $004034A0
$004034A0
$00401651
Additional information:
Mantis conversion info:
- Mantis ID: 34051
- OS: Windows
- OS Build: 10
- Platform: PC
- Version: 3.0.4