]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Remove last call to Preanalyze_And_Resolve from Exp_Aggr
authorEric Botcazou <ebotcazou@adacore.com>
Fri, 29 Nov 2024 08:04:09 +0000 (09:04 +0100)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Fri, 13 Dec 2024 08:36:01 +0000 (09:36 +0100)
All the expressions are now at least preanalyzed in a non-iterated context,
so we do not need to redo it in Aggr_Assignment_OK_For_Backend, given that
Is_OK_Aggregate explicitly rejects iterated component associations.

gcc/ada/ChangeLog:

* exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Do not call again
Preanalyze_And_Resolve on the expression.

gcc/ada/exp_aggr.adb

index c93554347ad297c676efc5eb8a3214a7b3ad8629..c0218c9e3dcc144ba81037fb367d6a69f214c0fa 100644 (file)
@@ -534,10 +534,7 @@ package body Exp_Aggr is
       end if;
 
       --  If the expression has side effects (e.g. contains calls with
-      --  potential side effects) reject as well. We only preanalyze the
-      --  expression to prevent the removal of intended side effects.
-
-      Preanalyze_And_Resolve (Expr, Ctyp);
+      --  potential side effects), then reject it as well.
 
       if not Side_Effect_Free (Expr) then
          return False;