From 09192336035599d542d3a6bc149a7b477bb68ed3 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Mon, 30 Aug 2021 21:36:05 +0200 Subject: trans-chap9.adb: handle async_abort, sync_abort. Fix #1654 --- src/psl/psl-subsets.adb | 17 +++++++++++++++++ src/psl/psl-subsets.ads | 5 +++++ 2 files changed, 22 insertions(+) (limited to 'src/psl') diff --git a/src/psl/psl-subsets.adb b/src/psl/psl-subsets.adb index 9ff16a6ff..44d74499b 100644 --- a/src/psl/psl-subsets.adb +++ b/src/psl/psl-subsets.adb @@ -14,6 +14,8 @@ -- You should have received a copy of the GNU General Public License -- along with this program. If not, see . +with Types; use Types; + with PSL.Types; use PSL.Types; with PSL.Errors; use PSL.Errors; @@ -197,4 +199,19 @@ package body PSL.Subsets is null; end case; end Check_Simple; + + function Is_Async_Abort (N : Node) return Boolean is + begin + case Get_Kind (N) is + when N_Async_Abort => + return True; + when N_Sync_Abort => + return False; + when N_Abort => + return False; + when others => + raise Internal_Error; + end case; + end Is_Async_Abort; + end PSL.Subsets; diff --git a/src/psl/psl-subsets.ads b/src/psl/psl-subsets.ads index 50aeba6d4..472c4579b 100644 --- a/src/psl/psl-subsets.ads +++ b/src/psl/psl-subsets.ads @@ -36,4 +36,9 @@ package PSL.Subsets is -- All other operators not mentioned above are supported in the simple -- subset without restriction. procedure Check_Simple (N : Node); + + -- Return True iff N is an async abort. + -- True for N_Async_Abort, False for N_Sync_Abort. + -- Here we also decide for N_Abort. + function Is_Async_Abort (N : Node) return Boolean; end PSL.Subsets; -- cgit v1.2.3