Uninitialized variable will trigger an internal error(200306031) in O3
Original Reporter info from Mantis: 0h2o
-
Reporter name: 0h2o
Original Reporter info from Mantis: 0h2o
- Reporter name: 0h2o
Description:
Hi again, the following program will trigger an internal error(200306031) in ppcx64 when -O3 is specified:
var a, b : integer;
begin
b := 0;
b := b - a - a { `b := b - a` won't trigger the error }
end.
It seems that this can be related to an undefined behavior though, assigning a value to a
will eliminate the internal error.
Steps to reproduce:
- build the latest fpc-3.3.1 with fpc-3.2.0
- path_to_fpc-3.3.1/compiler/ppcx64 -O3 ./ice9.pas
Mantis conversion info:
- Mantis ID: 37508
- Platform: amd64
- Version: 3.3.1
- Fixed in version: 3.3.1
- Fixed in revision: 46309 (#d7ba09f5)
- Monitored by: » Vincent (Vincent Snijders), » felixonmars (Felix Yan), » @CuriousKit (J. Gareth Moreton)