diff options
author | Viljar Indus <indus@adacore.com> | 2024-09-04 12:21:40 +0300 |
---|---|---|
committer | Marc Poulhiès <dkm@gcc.gnu.org> | 2024-10-08 10:37:13 +0200 |
commit | 4ca91b84aa1cdb5fcd178ecb2bc7a13c9be082e3 (patch) | |
tree | e33997f74c04fa7d3381bb788acf6cbdf09e9bbf /gcc/ada/doc/gnat_rm | |
parent | 9ca4d98d0349882510b1ae705087a00ee9dcb0f5 (diff) | |
download | gcc-4ca91b84aa1cdb5fcd178ecb2bc7a13c9be082e3.zip gcc-4ca91b84aa1cdb5fcd178ecb2bc7a13c9be082e3.tar.gz gcc-4ca91b84aa1cdb5fcd178ecb2bc7a13c9be082e3.tar.bz2 |
ada: Use corect capacity with two dimensional arrays
Previously when a bounded list was initialized with an array aggregate
then we used the correct size only if the array was one dimensional.
This patch adds support for deriving the size for multidimensional array
types as well.
gcc/ada/ChangeLog:
* exp_aggr.adb (Build_Siz_Exp): Support deriving the size of the
container aggregate with multi-dimensional arrays. Make the
function return an node of an expression instead of an integer.
Additionally calculate the size expression for
Component_Associations.
(To_Int) make this method available for more functions.
(Aggregate_Size) Relocate the calculation of
Componenet_Associations to Build_Siz_Exp.
Diffstat (limited to 'gcc/ada/doc/gnat_rm')
0 files changed, 0 insertions, 0 deletions