The comment for routine Is_RTE explains that it is a more efficient
equivalent of an equality testing with routine RTE.

Tested on x86_64-pc-linux-gnu, committed on trunk

gcc/ada/

        * checks.adb (Apply_Scalar_Range_Check): Use Is_RTE.
diff --git a/gcc/ada/checks.adb b/gcc/ada/checks.adb
--- a/gcc/ada/checks.adb
+++ b/gcc/ada/checks.adb
@@ -3326,7 +3326,7 @@ package body Checks is
                         --  provide a wider range.
 
                         if not CodePeer_Mode
-                          or else Target_Typ /= RTE (RE_Priority)
+                          or else not Is_RTE (Target_Typ, RE_Priority)
                         then
                            Bad_Value;
                         end if;


Reply via email to