aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGhjuvan Lacambre <lacambre@adacore.com>2022-03-15 10:57:45 +0100
committerPierre-Marie de Rodat <derodat@adacore.com>2022-05-17 08:25:44 +0000
commit6e2d6b8e8ead146f6d7e314c9d6763bbefc7459b (patch)
treeb7062444f904057f00e17210768c51df3fa7551a
parent98208e364c10f71a1609b93959cc81e1e2549163 (diff)
downloadgcc-6e2d6b8e8ead146f6d7e314c9d6763bbefc7459b.zip
gcc-6e2d6b8e8ead146f6d7e314c9d6763bbefc7459b.tar.gz
gcc-6e2d6b8e8ead146f6d7e314c9d6763bbefc7459b.tar.bz2
[Ada] Don't create calls to Abort_Undefer when not Abort_Allowed
Prevent creation of references to Abort_Undefer when aborts aren't allowed. Another solution could have been an early return at Expand_N_Asynchronous_Select's beginning, but this would break backends that currently expect trees that do not contain any N_Asynchronous_Selects in their AST (e.g. CodePeer). gcc/ada/ * exp_ch9.adb (Expand_N_Asynchronous_Select): Don't generate Abort_Undefers when not Abort_Allowed.
-rw-r--r--gcc/ada/exp_ch9.adb4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/ada/exp_ch9.adb b/gcc/ada/exp_ch9.adb
index f706780..0e551ab 100644
--- a/gcc/ada/exp_ch9.adb
+++ b/gcc/ada/exp_ch9.adb
@@ -7812,7 +7812,9 @@ package body Exp_Ch9 is
Hdle := New_List (Build_Abort_Block_Handler (Loc));
- Prepend_To (Astats, Build_Runtime_Call (Loc, RE_Abort_Undefer));
+ if Abort_Allowed then
+ Prepend_To (Astats, Build_Runtime_Call (Loc, RE_Abort_Undefer));
+ end if;
Abortable_Block :=
Make_Block_Statement (Loc,