summaryrefslogtreecommitdiff
path: root/gcc/ada/checks.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@adacore.com>2018-05-30 08:56:54 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2018-05-30 08:56:54 +0000
commit88ad52c90d5aa992fbbcba44f91faccdc02150ef (patch)
tree3544e336a5da00b41c23294179f3959cb031291e /gcc/ada/checks.adb
parent8ed508fe7fce89d1798a3cabf227d3e1c1d5cf85 (diff)
downloadgcc-88ad52c90d5aa992fbbcba44f91faccdc02150ef.tar.gz
[Ada] Ignore out of range values for System.Priority in CodePeer mode
2018-05-30 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * checks.adb (Apply_Scalar_Range_Check): * sem_eval.adb (Check_Non_Static_Context, Out_Of_Range): Ignore out of range values for System.Priority in CodePeer mode since the actual target compiler may provide a wider range. From-SVN: r260929
Diffstat (limited to 'gcc/ada/checks.adb')
-rw-r--r--gcc/ada/checks.adb11
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/ada/checks.adb b/gcc/ada/checks.adb
index 9fb775f500a..8fc81e9e840 100644
--- a/gcc/ada/checks.adb
+++ b/gcc/ada/checks.adb
@@ -3065,7 +3065,16 @@ package body Checks is
-- If definitely not in range, warn
elsif Lov > Hi or else Hiv < Lo then
- Bad_Value;
+ -- Ignore out of range values for System.Priority in
+ -- CodePeer mode since the actual target compiler may
+ -- provide a wider range.
+
+ if not CodePeer_Mode
+ or else Target_Typ /= RTE (RE_Priority)
+ then
+ Bad_Value;
+ end if;
+
return;
-- Otherwise we don't know