summaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2008-08-22 14:56:20 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2008-08-22 14:56:20 +0000
commit2320c864092b4bc6788eb9e5278a39981bc612e6 (patch)
tree34297d27a614b6cbc18b07fa7dbd5a391ecd90a2 /gcc/ada
parent1778b13a4f18c47a36c6802ba58b1637eaa06fab (diff)
downloadgcc-2320c864092b4bc6788eb9e5278a39981bc612e6.tar.gz
2008-08-22 Gary Dismukes <dismukes@adacore.com>
* exp_aggr.adb (Static_Array_Aggregate): Call Analyze_And_Resolve on the component expression copies rather than directly setting Etype and Is_Static_Expression. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@139479 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/exp_aggr.adb11
1 files changed, 6 insertions, 5 deletions
diff --git a/gcc/ada/exp_aggr.adb b/gcc/ada/exp_aggr.adb
index c81e401381d..df5617a09fc 100644
--- a/gcc/ada/exp_aggr.adb
+++ b/gcc/ada/exp_aggr.adb
@@ -6441,13 +6441,13 @@ package body Exp_Aggr is
loop
Append_To
(Expressions (Agg), New_Copy (Expression (Expr)));
- Set_Etype (Last (Expressions (Agg)), Component_Type (Typ));
- -- Integer literals should always be marked as static
+ -- The copied expression must be analyzed and resolved.
+ -- Besides setting the type, this ensures that static
+ -- expressions are appropriately marked as such.
- if Nkind (Expression (Expr)) = N_Integer_Literal then
- Set_Is_Static_Expression (Last (Expressions (Agg)));
- end if;
+ Analyze_And_Resolve
+ (Last (Expressions (Agg)), Component_Type (Typ));
end loop;
Set_Aggregate_Bounds (Agg, Bounds);
@@ -6464,4 +6464,5 @@ package body Exp_Aggr is
return False;
end if;
end Static_Array_Aggregate;
+
end Exp_Aggr;