From 48b6386f5d0bdcbe5c901678a043516d544a9f7f Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Mon, 20 Apr 2020 13:04:45 +0200 Subject: [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. --- gcc/ada/checks.adb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gcc/ada') diff --git a/gcc/ada/checks.adb b/gcc/ada/checks.adb index 4382951..ad60a45 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) -- cgit v1.1