From 1b08b89b7b552beecc90672f8ed0b1a858169658 Mon Sep 17 00:00:00 2001 From: florian Date: Sun, 6 Nov 2022 16:38:01 +0100 Subject: [PATCH] * check if a target really supports safecall before calling load_safecallresult_node --- compiler/optdfa.pas | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/compiler/optdfa.pas b/compiler/optdfa.pas index 35f1fb18a1..f8e280d1d7 100644 --- a/compiler/optdfa.pas +++ b/compiler/optdfa.pas @@ -54,7 +54,9 @@ unit optdfa; implementation uses - globtype,constexp, + globtype, + systems, + constexp, verbose, symconst,symdef,symsym, defutil, @@ -642,7 +644,8 @@ unit optdfa; begin if current_procinfo.procdef.proctypeoption=potype_constructor then resultnode:=load_self_node - else if current_procinfo.procdef.proccalloption=pocall_safecall then + else if (current_procinfo.procdef.proccalloption=pocall_safecall) and + (tf_safecall_exceptions in target_info.flags) then resultnode:=load_safecallresult_node else resultnode:=load_result_node;