aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Trojanek <trojanek@adacore.com>2020-05-12 21:17:08 +0200
committerPierre-Marie de Rodat <derodat@adacore.com>2020-07-07 05:26:57 -0400
commit2e724314af6587d9833bc0ec1b10c9e24206b311 (patch)
treead836518c934cf0419a48ca9eafe3548c5cd83c7
parente378df6d39e76bc5cdc56b3d7c8c57601fe8d6c0 (diff)
downloadgcc-2e724314af6587d9833bc0ec1b10c9e24206b311.zip
gcc-2e724314af6587d9833bc0ec1b10c9e24206b311.tar.gz
gcc-2e724314af6587d9833bc0ec1b10c9e24206b311.tar.bz2
[Ada] Freeze aspect expression relocated to pragma Precondition
gcc/ada/ * contracts.adb (Analyze_Entry_Or_Subprogram_Contract, Process_Preconditions_For): Freeze expression that has been relocated to pragma Precondition, not the expression which is still in the aspect.
-rw-r--r--gcc/ada/contracts.adb8
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/ada/contracts.adb b/gcc/ada/contracts.adb
index 9931334..50d8422 100644
--- a/gcc/ada/contracts.adb
+++ b/gcc/ada/contracts.adb
@@ -653,7 +653,9 @@ package body Contracts is
Freeze_Expr_Types
(Def_Id => Subp_Id,
Typ => Standard_Boolean,
- Expr => Expression (Corresponding_Aspect (Prag)),
+ Expr =>
+ Expression
+ (First (Pragma_Argument_Associations (Prag))),
N => Bod);
end if;
@@ -2603,7 +2605,9 @@ package body Contracts is
Freeze_Expr_Types
(Def_Id => Subp_Id,
Typ => Standard_Boolean,
- Expr => Expression (Corresponding_Aspect (Prag)),
+ Expr =>
+ Expression
+ (First (Pragma_Argument_Associations (Prag))),
N => Body_Decl);
end if;