Compiler (ppcx) consumes all memory when optimizing
Original Reporter info from Mantis: HK59 @han.k
-
Reporter name: han
Original Reporter info from Mantis: HK59 @han.k
- Reporter name: han
Description:
A case statement with a large range causes with {$OPTIMIZATION ON} the compiler ppcx to consume all available memory. Happens in MSwindows and Linux.
Steps to reproduce:
See attached zipped tiny application. If the target is 64 bit it crashes my win10 so be aware. It contains an {OPTIMIZATION OFF} If you change it to {
OPTIMIZATION ON} the ppcx will consume all the memory. If the target is i386 WIN10 64bit stays healthy and compiler end with "out of memory".
It is caused by case range. Reducing range from +99999999 to +9999999 fixes the problem:
Causes the compiler to consume all memory:
case year of
3000..+99999999:begin
end;
end;{case}
Compiles without problems:
case year of
3000..+9999999:begin
end;
end;{case}
Additional information:
https://forum.lazarus.freepascal.org/index.php/topic,37979.0.html
Mantis conversion info:
- Mantis ID: 32311
- Platform: Windows and Linux
- Version: 3.0.2
- Fixed in version: 3.1.1
- Fixed in revision: 37390 (#cc443281)
- Monitored by: » Vincent (Vincent Snijders)