This patch recognizes additional cases of aggregates in assignment statements that can be built in place and do not require the creation of temporaries. This optimization prevents stack overflows. The patch covers aggregates for arrays of arrays and multidimensional arrays whose components are static and where the target of the assignment is a selected component or an indexed component that is side-effect free. Given the following: with ess; use ess; procedure P is begin This_Ptr.Data_Pool := (others => (others => 0)); for I in 1 .. 5 loop for J in Data_Buffer_Type'range loop This_Ptr.Data_Pool (I) (J) := 0; end loop; end loop; This_Ptr.all := Empty_R; end P; Compiling p.adb with stack usage: gcc -S -gnatp -O2 -fstack-usage p.adb Must produce a file p.su containing: p.adb:6:1:P 32 static Tested on x86_64-pc-linux-gnu, committed on trunk 2010-10-07 Ed Schonberg * exp_aggr.adb (Expand_Array_Aggregate): Recognize additional cases where an aggregate in an assignment can be built directly into the target, and does not require the creation of a temporary that may overflow the stack.