From 6d7d342a391f9ab3b0fa6779bfe9657d574695e2 Mon Sep 17 00:00:00 2001 From: Ed Schonberg Date: Wed, 26 Sep 2018 09:16:39 +0000 Subject: [PATCH] [Ada] Disable special handling for preconditions specified by pragmas 2018-09-26 Ed Schonberg gcc/ada/ * contracts.adb (Analyze_Entry_Or_Subprogram_Contract): The analysis of preconditions specified by pragmas (rather than aspects) is not delayed, and therefore expressions functions that are completions do not need special handling during expansion. From-SVN: r264604 --- gcc/ada/ChangeLog | 8 ++++++++ gcc/ada/contracts.adb | 4 +++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index cbedcc098da..e1dd3eb9fb8 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,11 @@ +2018-09-26 Ed Schonberg + + * contracts.adb (Analyze_Entry_Or_Subprogram_Contract): The + analysis of preconditions specified by pragmas (rather than + aspects) is not delayed, and therefore expressions functions + that are completions do not need special handling during + expansion. + 2018-09-26 Ed Schonberg * exp_unst.adb: Fix handling of up level references for entries. diff --git a/gcc/ada/contracts.adb b/gcc/ada/contracts.adb index 136c05c66d1..8b18c398cc4 100644 --- a/gcc/ada/contracts.adb +++ b/gcc/ada/contracts.adb @@ -620,7 +620,9 @@ package body Contracts is Prag := Pre_Post_Conditions (Items); while Present (Prag) loop - if Freeze_Types then + if Freeze_Types + and then Present (Corresponding_Aspect (Prag)) + then Freeze_Expr_Types (Def_Id => Subp_Id, Typ => Standard_Boolean, -- 2.30.2