diff options
author | Gary Dismukes <dismukes@adacore.com> | 2008-08-22 14:12:04 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2008-08-22 14:12:04 +0200 |
commit | 597d7158c66a05d0324c54c6dbaafb999f049301 (patch) | |
tree | 4849789b8ace1f34480f9bbcc843de37354fce31 /gcc/ada/exp_aggr.adb | |
parent | 5f0085c780dc6269ecbe30618db58ba75ca24df1 (diff) | |
download | gcc-597d7158c66a05d0324c54c6dbaafb999f049301.tar.gz |
exp_aggr.adb (Static_Array_Aggregate): When a static array aggregate with a range is transformed into a positional...
2008-08-22 Gary Dismukes <dismukes@adacore.com>
* exp_aggr.adb (Static_Array_Aggregate): When a static array aggregate
with a range is transformed into a positional aggregate, any copied
component literals should be marked Is_Static_Expression.
* sem_eval.adb (Compile_Time_Known_Value): Don't treat null literals as
not being known at at compile time when Configurable_Run_Time_Mode is
true.
From-SVN: r139442
Diffstat (limited to 'gcc/ada/exp_aggr.adb')
-rw-r--r-- | gcc/ada/exp_aggr.adb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/ada/exp_aggr.adb b/gcc/ada/exp_aggr.adb index bc3b954fb6c..e8b1e732e2b 100644 --- a/gcc/ada/exp_aggr.adb +++ b/gcc/ada/exp_aggr.adb @@ -6442,6 +6442,12 @@ package body Exp_Aggr is Append_To (Expressions (Agg), New_Copy (Expression (Expr))); Set_Etype (Last (Expressions (Agg)), Component_Type (Typ)); + + -- Integer literals should always be marked as static + + if Nkind (Expression (Expr)) = N_Integer_Literal then + Set_Is_Static_Expression (Last (Expressions (Agg))); + end if; end loop; Set_Aggregate_Bounds (Agg, Bounds); |