aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2022-07-14 01:25:25 +0200
committerMarc Poulhiès <poulhies@adacore.com>2022-09-02 09:34:07 +0200
commit347dec125b662bdeb6d426ead3449e1209c2ce28 (patch)
treec0288bdc79a54813fab993ea73981add55f42dc9 /gcc
parent34d054d126f0fa870e36e37709199db84a5e1bd8 (diff)
downloadgcc-347dec125b662bdeb6d426ead3449e1209c2ce28.zip
gcc-347dec125b662bdeb6d426ead3449e1209c2ce28.tar.gz
gcc-347dec125b662bdeb6d426ead3449e1209c2ce28.tar.bz2
[Ada] Adjust previous change to Expand_Subtype_From_Expr
An aggregate may have been rewritten before being seen by the procedure. gcc/ada/ * exp_util.adb (Expand_Subtype_From_Expr): Be prepared for rewritten aggregates as expressions.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/exp_util.adb2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb
index a8636bb..0a0ae93 100644
--- a/gcc/ada/exp_util.adb
+++ b/gcc/ada/exp_util.adb
@@ -5741,7 +5741,7 @@ package body Exp_Util is
-- non-statically-matching subtypes on 'Access of this object.
and then (Nkind (N) /= N_Object_Declaration
- or else Nkind (Exp) = N_Aggregate
+ or else Nkind (Original_Node (Exp)) = N_Aggregate
or else Is_Constr_Subt_For_U_Nominal (Exp_Typ))
then
-- Within an initialization procedure, a selected component