public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r11-1884] [Ada] Freeze aspect expression relocated to pragma Precondition
@ 2020-07-07  9:28 Pierre-Marie de Rodat
  0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2020-07-07  9:28 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:2e724314af6587d9833bc0ec1b10c9e24206b311

commit r11-1884-g2e724314af6587d9833bc0ec1b10c9e24206b311
Author: Piotr Trojanek <trojanek@adacore.com>
Date:   Tue May 12 21:17:08 2020 +0200

    [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:
---
 gcc/ada/contracts.adb | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/gcc/ada/contracts.adb b/gcc/ada/contracts.adb
index 99313348b27..50d842244c1 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;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-07-07  9:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-07  9:28 [gcc r11-1884] [Ada] Freeze aspect expression relocated to pragma Precondition Pierre-Marie de Rodat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).