aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2024-11-29 09:04:09 +0100
committerMarc Poulhiès <dkm@gcc.gnu.org>2024-12-13 09:36:01 +0100
commit78b8a597316490105995f636f00c972235ac6237 (patch)
tree550d0faa2013ca02e20b875b83dfe5f2938ababa /gcc
parent5b30245800b1657f6c29212ca843c43bbfcffd20 (diff)
downloadgcc-78b8a597316490105995f636f00c972235ac6237.zip
gcc-78b8a597316490105995f636f00c972235ac6237.tar.gz
gcc-78b8a597316490105995f636f00c972235ac6237.tar.bz2
ada: Remove last call to Preanalyze_And_Resolve from Exp_Aggr
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.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/exp_aggr.adb5
1 files changed, 1 insertions, 4 deletions
diff --git a/gcc/ada/exp_aggr.adb b/gcc/ada/exp_aggr.adb
index c935543..c0218c9 100644
--- a/gcc/ada/exp_aggr.adb
+++ b/gcc/ada/exp_aggr.adb
@@ -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;