From: Piotr Trojanek Date: Tue, 12 May 2020 19:17:08 +0000 (+0200) Subject: [Ada] Freeze aspect expression relocated to pragma Precondition X-Git-Tag: basepoints/gcc-12~6373 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2e724314af6587d9833bc0ec1b10c9e24206b311;p=thirdparty%2Fgcc.git [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. --- diff --git a/gcc/ada/contracts.adb b/gcc/ada/contracts.adb index 99313348b27a..50d842244c1d 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;