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.
This commit is contained in:
Richard Kenner 2023-11-03 18:04:59 -04:00 committed by Marc Poulhiès
parent 73ecd592c9
commit 89ed545585

View file

@ -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;