mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-08 09:28:19 +02:00
* dead store elimnation should not remove statements which can cause an exception
This commit is contained in:
parent
05c45486e8
commit
a0366d7d28
@ -79,7 +79,7 @@ unit optdeadstore;
|
||||
((a.right.nodetype in [niln,stringconstn,pointerconstn,setconstn,guidconstn]) or
|
||||
((a.right.nodetype=ordconstn) and not(cs_check_range in current_settings.localswitches)) or
|
||||
((a.right.nodetype=realconstn) and not(cs_ieee_errors in current_settings.localswitches)) or
|
||||
((cs_opt_dead_values in current_settings.optimizerswitches) and not(might_have_sideeffects(a.right)))
|
||||
((cs_opt_dead_values in current_settings.optimizerswitches) and not(might_have_sideeffects(a.right,[mhs_exceptions])))
|
||||
) then
|
||||
begin
|
||||
redundant:=not(assigned(a.successor)) or not(DFASetIn(a.successor.optinfo^.life,a.left.optinfo^.index));
|
||||
|
Loading…
Reference in New Issue
Block a user