aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2023-10-26 10:43:38 +0200
committerMarc Poulhiès <poulhies@adacore.com>2023-11-21 10:57:41 +0100
commit5ee80f712883981fde26976bb4f9e157e105944c (patch)
tree60398700a9ac367ba7e823ba31997a0dc822eb50
parent6f69104c9e7cc455cc83139b063c08124e465f64 (diff)
downloadgcc-5ee80f712883981fde26976bb4f9e157e105944c.zip
gcc-5ee80f712883981fde26976bb4f9e157e105944c.tar.gz
gcc-5ee80f712883981fde26976bb4f9e157e105944c.tar.bz2
ada: Small improvement to Null_Status function
The function is used to optimize away access checks. gcc/ada/ * sem_util.adb (Null_Status): Deal with unchecked type conversions.
-rw-r--r--gcc/ada/sem_util.adb2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
index 3d870b1..eb2d83a 100644
--- a/gcc/ada/sem_util.adb
+++ b/gcc/ada/sem_util.adb
@@ -25429,7 +25429,7 @@ package body Sem_Util is
-- Check the status of the operand of a type conversion
- elsif Nkind (N) = N_Type_Conversion then
+ elsif Nkind (N) in N_Type_Conversion | N_Unchecked_Type_Conversion then
return Null_Status (Expression (N));
-- The input denotes a reference to an entity. Determine whether the