From: Piotr Trojanek <[email protected]>
Code cleanup; semantics is unaffected.
gcc/ada/ChangeLog:
* exp_ch4.adb (Expand_N_In): Rewrite with True/False entity array.
Tested on x86_64-pc-linux-gnu, committed on master.
---
gcc/ada/exp_ch4.adb | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb
index 232ba1be97a..dc4d3261082 100644
--- a/gcc/ada/exp_ch4.adb
+++ b/gcc/ada/exp_ch4.adb
@@ -7219,14 +7219,13 @@ package body Exp_Ch4 is
-- since we cannot rely on dynamic levels.
if No_Dynamic_Accessibility_Checks_Enabled (Lop) then
- if Static_Accessibility_Level
- (Lop, Object_Decl_Level)
- > Type_Access_Level (Rtyp)
- then
- Rewrite (N, New_Occurrence_Of (Standard_False, Loc));
- else
- Rewrite (N, New_Occurrence_Of (Standard_True, Loc));
- end if;
+ Rewrite (N,
+ New_Occurrence_Of
+ (Boolean_Literals
+ (Static_Accessibility_Level
+ (Lop, Object_Decl_Level) <=
+ Type_Access_Level (Rtyp)),
+ Loc));
Analyze_And_Resolve (N, Restyp);
-- If a conversion of the anonymous access value to the
--
2.53.0