Fix `normalize()` IE 200108231 under `-O3 -OoDEADSTORE` (#41682)

Fixes #41682 (closed)

Four bugs in the blockn extraction in normalize() (opttree.pas), all gated on -OoDEADSTORE. Each case is explained in a comment where it's handled. Confirmed reproducing on aarch64-linux, x86_64-win64 and i386-win32 with the same minimal test (included). The IE additionally fires when compiling rtl/linux/system.pp, which is the original report.

system.pp compile (aarch64-linux)

MAIN:

Target OS: Linux for AArch64
Compiling system.pp
genmath.inc(854,5) Fatal: Internal error 200108231
Fatal: Compilation aborted

PATCHED:

Target OS: Linux for AArch64
Compiling system.pp
Assembling system
42864 lines compiled, 0.7 sec

Testsuite (Win64)

MAIN:

Successfully compiled = 4649
Successfully failed = 1463
Compilation failures = 11

PATCHED:

Total number of compilations = 6128 (15:6113)
Successfully compiled = 4650
Successfully failed = 1463
Compilation failures = 11

Merge request reports

Loading