aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2020-04-20 13:04:45 +0200
committerPierre-Marie de Rodat <derodat@adacore.com>2020-06-17 04:14:23 -0400
commit48b6386f5d0bdcbe5c901678a043516d544a9f7f (patch)
treed30e0f8f76375ea6587bca45d78e4e02b1abbaf9 /gcc/ada
parent86f80604361ef12ecbe2d749fcb5f08ec7f71bfc (diff)
downloadgcc-48b6386f5d0bdcbe5c901678a043516d544a9f7f.zip
gcc-48b6386f5d0bdcbe5c901678a043516d544a9f7f.tar.gz
gcc-48b6386f5d0bdcbe5c901678a043516d544a9f7f.tar.bz2
[Ada] Add early return to Apply_Universal_Integer_Attribute_Checks
2020-06-17 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * checks.adb (Apply_Universal_Integer_Attribute_Checks): Do not do anything when the type of the node is already Universal_Integer.
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/checks.adb5
1 files changed, 5 insertions, 0 deletions
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)