From: Eric Botcazou <ebotca...@adacore.com>

It exposed a small loophole in the Backend_Processing_Possible predicate.

gcc/ada/ChangeLog:

        * exp_aggr.adb (Backend_Processing_Possible.Component_Check): Return
        False for delayed conditional expressions.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 gcc/ada/exp_aggr.adb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gcc/ada/exp_aggr.adb b/gcc/ada/exp_aggr.adb
index 48478f350bb..a25d28d2edd 100644
--- a/gcc/ada/exp_aggr.adb
+++ b/gcc/ada/exp_aggr.adb
@@ -865,7 +865,9 @@ package body Exp_Aggr is
 
             --  Checks 8: (no delayed components)
 
-            if Is_Delayed_Aggregate (Expr) then
+            if Is_Delayed_Aggregate (Expr)
+              or else Is_Delayed_Conditional_Expression (Expr)
+            then
                return False;
             end if;
 
-- 
2.43.0

Reply via email to