aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2017-01-06 12:19:47 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2017-01-06 12:19:47 +0100
commit50145b93899e4a184a20309942255b6e68f206b3 (patch)
tree2a29a0550c32bf983c4cf4bdc5135b7e56a34bcd
parent229fa5dbde6e8a58c8409712a9e09d76793677c0 (diff)
downloadgcc-50145b93899e4a184a20309942255b6e68f206b3.zip
gcc-50145b93899e4a184a20309942255b6e68f206b3.tar.gz
gcc-50145b93899e4a184a20309942255b6e68f206b3.tar.bz2
[multiple changes]
2017-01-06 Yannick Moy <moy@adacore.com> * sem_attr.adb (Analyze_Attribute/Attribute_Loop_Entry): Analyze node in tree, which means not analyzing the previous prefix if the node has been rewritten into its prefix. 2017-01-06 Gary Dismukes <dismukes@adacore.com> * s-tpobop.adb: Minor reformatting. From-SVN: r244137
-rw-r--r--gcc/ada/ChangeLog10
-rw-r--r--gcc/ada/s-tpobop.adb10
-rw-r--r--gcc/ada/sem_attr.adb6
3 files changed, 19 insertions, 7 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index ce482e3..e2fe43e 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,13 @@
+2017-01-06 Yannick Moy <moy@adacore.com>
+
+ * sem_attr.adb (Analyze_Attribute/Attribute_Loop_Entry): Analyze node
+ in tree, which means not analyzing the previous prefix if the node has
+ been rewritten into its prefix.
+
+2017-01-06 Gary Dismukes <dismukes@adacore.com>
+
+ * s-tpobop.adb: Minor reformatting.
+
2017-01-06 Ed Schonberg <schonberg@adacore.com>
* checks.adb (Ensure_Valid): Do not generate a validity check
diff --git a/gcc/ada/s-tpobop.adb b/gcc/ada/s-tpobop.adb
index a6f6c99..3a884c5 100644
--- a/gcc/ada/s-tpobop.adb
+++ b/gcc/ada/s-tpobop.adb
@@ -348,17 +348,17 @@ package body System.Tasking.Protected_Objects.Operations is
or else Object.Entry_Queue_Maxes /= null
then
-- Need to check the queue length. Computing the length is an
- -- unusual case and is slow (need to walk the queue)
+ -- unusual case and is slow (need to walk the queue).
Queue_Length := Queuing.Count_Waiting (Object.Entry_Queues (E));
if (Run_Time_Restrictions.Set (Max_Entry_Queue_Length)
- and then Queue_Length >=
+ and then Queue_Length >=
Run_Time_Restrictions.Value (Max_Entry_Queue_Length))
or else
- (Object.Entry_Queue_Maxes /= null
- and then Object.Entry_Queue_Maxes (Index) /= 0
- and then Queue_Length >= Object.Entry_Queue_Maxes (Index))
+ (Object.Entry_Queue_Maxes /= null
+ and then Object.Entry_Queue_Maxes (Index) /= 0
+ and then Queue_Length >= Object.Entry_Queue_Maxes (Index))
then
-- This violates the Max_Entry_Queue_Length restriction or the
-- Max_Queue_Length bound, raise Program_Error.
diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb
index db2f23d..188872e 100644
--- a/gcc/ada/sem_attr.adb
+++ b/gcc/ada/sem_attr.adb
@@ -4488,9 +4488,11 @@ package body Sem_Attr is
if Is_Ignored (Enclosing_Pragma) then
Rewrite (N, Relocate_Node (P));
- end if;
+ Preanalyze_And_Resolve (N);
- Preanalyze_And_Resolve (P);
+ else
+ Preanalyze_And_Resolve (P);
+ end if;
end Loop_Entry;
-------------