aboutsummaryrefslogtreecommitdiffstats
path: root/src/psl
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2021-08-30 21:36:05 +0200
committerTristan Gingold <tgingold@free.fr>2021-08-30 21:36:05 +0200
commit09192336035599d542d3a6bc149a7b477bb68ed3 (patch)
tree574bb27543878d3e4af546718efeb971aeb7e3b7 /src/psl
parent852f4310b717765360f5d3bf575d40af5769f70d (diff)
downloadghdl-09192336035599d542d3a6bc149a7b477bb68ed3.tar.gz
ghdl-09192336035599d542d3a6bc149a7b477bb68ed3.tar.bz2
ghdl-09192336035599d542d3a6bc149a7b477bb68ed3.zip
trans-chap9.adb: handle async_abort, sync_abort. Fix #1654
Diffstat (limited to 'src/psl')
-rw-r--r--src/psl/psl-subsets.adb17
-rw-r--r--src/psl/psl-subsets.ads5
2 files changed, 22 insertions, 0 deletions
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 <gnu.org/licenses>.
+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;