aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_util.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2014-07-16 16:01:46 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2014-07-16 16:01:46 +0200
commit6cade1b0a0c3b50e1c1d60357a948f29de016ed5 (patch)
treea0f511d53c196978cd381722eee72529fc5dc536 /gcc/ada/sem_util.adb
parente59243faa1bfc9f5a84779ef20c4cb5a5046ffbe (diff)
downloadgcc-6cade1b0a0c3b50e1c1d60357a948f29de016ed5.zip
gcc-6cade1b0a0c3b50e1c1d60357a948f29de016ed5.tar.gz
gcc-6cade1b0a0c3b50e1c1d60357a948f29de016ed5.tar.bz2
[multiple changes]
2014-07-16 Yannick Moy <moy@adacore.com> * sem_attr.adb (Analyze_Attribute/cases Pred and Succ): Always enable range check on fixed-point types if not suppressed for the type. 2014-07-16 Hristian Kirtchev <kirtchev@adacore.com> * sem_util.adb (State_Has_Enabled_Property): Account for an external property denoted by an others choice. From-SVN: r212647
Diffstat (limited to 'gcc/ada/sem_util.adb')
-rw-r--r--gcc/ada/sem_util.adb9
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
index 624687e..7bc8232 100644
--- a/gcc/ada/sem_util.adb
+++ b/gcc/ada/sem_util.adb
@@ -7430,7 +7430,14 @@ package body Sem_Util is
while Present (Prop) loop
Prop_Nam := First (Choices (Prop));
- if Chars (Prop_Nam) = Property then
+ -- The property can be represented in two ways:
+ -- others => <value>
+ -- <property> => <value>
+
+ if Nkind (Prop_Nam) = N_Others_Choice
+ or else (Nkind (Prop_Nam) = N_Identifier
+ and then Chars (Prop_Nam) = Property)
+ then
return Is_True (Expr_Value (Expression (Prop)));
end if;