aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@adacore.com>2023-11-03 18:04:59 -0400
committerMarc Poulhiès <poulhies@adacore.com>2023-11-28 10:35:47 +0100
commit89ed5455850437782358e0b3fb399bb5d4ec5f65 (patch)
tree16fe4788217ab1d81d4b64fc3f09f50ff50e862d /gcc
parent73ecd592c9a8a99cf5d456d9a78d3c793390af1e (diff)
downloadgcc-89ed5455850437782358e0b3fb399bb5d4ec5f65.zip
gcc-89ed5455850437782358e0b3fb399bb5d4ec5f65.tar.gz
gcc-89ed5455850437782358e0b3fb399bb5d4ec5f65.tar.bz2
ada: Handle unchecked conversion in bound
Look through both unchecked and normal conversions when seeing if any part of a bound is uplevel. gcc/ada/ * exp_unst.adb (Note_Uplevel_Bound): Treat N_Unchecked_Type_Conversion like N_Type_Conversion.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/exp_unst.adb4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/ada/exp_unst.adb b/gcc/ada/exp_unst.adb
index b01cfc1..7acb065 100644
--- a/gcc/ada/exp_unst.adb
+++ b/gcc/ada/exp_unst.adb
@@ -643,7 +643,9 @@ package body Exp_Unst is
-- Conversion case
- elsif Nkind (N) = N_Type_Conversion then
+ elsif Nkind (N) in
+ N_Type_Conversion | N_Unchecked_Type_Conversion
+ then
Note_Uplevel_Bound (Expression (N), Ref);
end if;
end Note_Uplevel_Bound;