aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch13.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2014-08-01 16:02:43 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2014-08-01 16:02:43 +0200
commit2feb1f84d7f26dadd19811a81b33f7bf29065272 (patch)
treed04a81c0aa052ba819fa5b12d4ba13324ba8a928 /gcc/ada/sem_ch13.adb
parentfc193526f31a0ea8746348e0ee67aa37c6e7a9c7 (diff)
downloadgcc-2feb1f84d7f26dadd19811a81b33f7bf29065272.zip
gcc-2feb1f84d7f26dadd19811a81b33f7bf29065272.tar.gz
gcc-2feb1f84d7f26dadd19811a81b33f7bf29065272.tar.bz2
[multiple changes]
2014-08-01 Robert Dewar <dewar@adacore.com> * sem_ch8.adb: Minor reformatting. 2014-08-01 Yannick Moy <moy@adacore.com> * sem_ch13.adb (Insert_Pragma): Add special case for precondition pragmas from aspects, which need to be inserted in proper order. 2014-08-01 Ed Schonberg <schonberg@adacore.com> * exp_aggr.adb (Expand_Record_Aggregate, Init_Hidden_Discriminants): Handle properly a type extension that constrains a discriminated derived type that renames other discriminants of an ancestor. 2014-08-01 Thomas Quinot <quinot@adacore.com> * s-pack06.adb, s-pack10.adb, s-pack03.ads, s-pack12.adb, s-pack14.ads, s-pack25.adb: Fix minor inconsistencies and typos. From-SVN: r213469
Diffstat (limited to 'gcc/ada/sem_ch13.adb')
-rw-r--r--gcc/ada/sem_ch13.adb9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb
index 86a36ce..a741cff 100644
--- a/gcc/ada/sem_ch13.adb
+++ b/gcc/ada/sem_ch13.adb
@@ -1283,10 +1283,19 @@ package body Sem_Ch13 is
-- the proper insertion point. As a result the order of pragmas
-- is the same as the order of aspects.
+ -- As precondition pragmas generated from conjuncts in the
+ -- precondition aspect are presented in reverse order to
+ -- Insert_Pragma, insert them in the correct order here by not
+ -- skipping previously inserted precondition pragmas when the
+ -- current pragma is a precondition.
+
Decl := First (Declarations (N));
while Present (Decl) loop
if Nkind (Decl) = N_Pragma
and then From_Aspect_Specification (Decl)
+ and then not (Get_Pragma_Id (Decl) = Pragma_Precondition
+ and then
+ Get_Pragma_Id (Prag) = Pragma_Precondition)
then
Next (Decl);
else