]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Fix fallout of latest change to aggregate expansion
authorEric Botcazou <ebotcazou@adacore.com>
Tue, 22 Apr 2025 11:51:14 +0000 (13:51 +0200)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Mon, 30 Jun 2025 13:47:20 +0000 (15:47 +0200)
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.

gcc/ada/exp_aggr.adb

index 48478f350bb9faa85913f75c57ee5f2a9615208e..a25d28d2edd4353edd22cc11cc3a17132baf38b0 100644 (file)
@@ -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;