From: Eric Botcazou Date: Mon, 20 Apr 2020 11:04:45 +0000 (+0200) Subject: [Ada] Add early return to Apply_Universal_Integer_Attribute_Checks X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=48b6386f5d0bdcbe5c901678a043516d544a9f7f;p=gcc.git [Ada] Add early return to Apply_Universal_Integer_Attribute_Checks 2020-06-17 Eric Botcazou gcc/ada/ * checks.adb (Apply_Universal_Integer_Attribute_Checks): Do not do anything when the type of the node is already Universal_Integer. --- diff --git a/gcc/ada/checks.adb b/gcc/ada/checks.adb index 43829516c56..ad60a45273d 100644 --- a/gcc/ada/checks.adb +++ b/gcc/ada/checks.adb @@ -3823,6 +3823,11 @@ package body Checks is if Inside_A_Generic then return; + -- Nothing to do if the result type is universal integer + + elsif Typ = Universal_Integer then + return; + -- Nothing to do if checks are suppressed elsif Range_Checks_Suppressed (Typ)