aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPiotr Trojanek <trojanek@adacore.com>2021-06-23 10:17:24 +0200
committerPierre-Marie de Rodat <derodat@adacore.com>2021-09-20 12:31:30 +0000
commit2743363047517c25a884fcf8e08a8108f1368fa6 (patch)
treefcdc8d680890ca55d062e9ed23f537e3f2fbcce4 /gcc
parentb8d31ebcfa99599fb2c213e319aee4c6cf6e4f72 (diff)
downloadgcc-2743363047517c25a884fcf8e08a8108f1368fa6.zip
gcc-2743363047517c25a884fcf8e08a8108f1368fa6.tar.gz
gcc-2743363047517c25a884fcf8e08a8108f1368fa6.tar.bz2
[Ada] Don't examine all discriminants when looking for the first one
gcc/ada/ * sem_ch3.adb (Build_Discriminant_Constraints): Exit once a first discriminant is found and the Discrim_Present flag is set.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/sem_ch3.adb1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb
index e9b4456..dbcb0ba 100644
--- a/gcc/ada/sem_ch3.adb
+++ b/gcc/ada/sem_ch3.adb
@@ -10392,6 +10392,7 @@ package body Sem_Ch3 is
(Discr_Expr (J), Check_Concurrent => True)
then
Discrim_Present := True;
+ exit;
end if;
end loop;