public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-2845] ada: Add missing SCO generation for quantified expressions in object decl
@ 2023-07-28  7:31 Marc Poulhi?s
  0 siblings, 0 replies; only message in thread
From: Marc Poulhi?s @ 2023-07-28  7:31 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:808ac54287901a344080b42e78c181a0c3566ccf

commit r14-2845-g808ac54287901a344080b42e78c181a0c3566ccf
Author: Léo Creuse <creuse@adacore.com>
Date:   Thu Jul 13 12:30:42 2023 +0200

    ada: Add missing SCO generation for quantified expressions in object decl
    
    This change corrects the Has_Decision predicate in par_sco.adb to
    properly consider predicates of quantified expressions as
    decisions.
    
    gcc/ada/
    
            * par_sco.adb (Has_Decision): Consider that quantified expressions
            contain decisions.

Diff:
---
 gcc/ada/par_sco.adb | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/gcc/ada/par_sco.adb b/gcc/ada/par_sco.adb
index c3aa2a5936e..ce7de7f3d79 100644
--- a/gcc/ada/par_sco.adb
+++ b/gcc/ada/par_sco.adb
@@ -398,7 +398,8 @@ package body Par_SCO is
       function Check_Node (N : Node_Id) return Traverse_Result;
       --  Determine if Nkind (N) indicates the presence of a decision (i.e. N
       --  is a logical operator, which is a decision in itself, or an
-      --  IF-expression whose Condition attribute is a decision).
+      --  IF-expression whose Condition attribute is a decision, or a
+      --  quantified expression, whose predicate is a decision).
 
       ----------------
       -- Check_Node --
@@ -409,10 +410,11 @@ package body Par_SCO is
          --  If we are not sure this is a logical operator (AND and OR may be
          --  turned into logical operators with the Short_Circuit_And_Or
          --  pragma), assume it is. Putative decisions will be discarded if
-         --  needed in the secord pass.
+         --  needed in the second pass.
 
          if Is_Logical_Operator (N) /= False
            or else Nkind (N) = N_If_Expression
+           or else Nkind (N) = N_Quantified_Expression
          then
             return Abandon;
          else

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

only message in thread, other threads:[~2023-07-28  7:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-28  7:31 [gcc r14-2845] ada: Add missing SCO generation for quantified expressions in object decl Marc Poulhi?s

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).