diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2023-10-16 21:16:38 +0200 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2023-11-07 10:15:04 +0100 |
commit | a2e4afc6f6bd0fd3c3894a2192fcc09e0b60f0be (patch) | |
tree | e392f4cfef910e72c0edcbbc6ff6734c4cd4edb5 /gcc/gdbhooks.py | |
parent | de4f7051af5a00c3127cfd5c77f1a5b6d4000e42 (diff) | |
download | gcc-a2e4afc6f6bd0fd3c3894a2192fcc09e0b60f0be.zip gcc-a2e4afc6f6bd0fd3c3894a2192fcc09e0b60f0be.tar.gz gcc-a2e4afc6f6bd0fd3c3894a2192fcc09e0b60f0be.tar.bz2 |
ada: Elide temporary for aliased array with unconstrained nominal subtype
When the array is initialized with the result of a call to a function whose
result type is unconstrained, then the result is allocated with its bounds,
so the array can be rewritten as a renaming of the result in this case too.
gcc/ada/
* exp_ch3.adb (Expand_N_Object_Declaration): Fold initialization
expression of Nominal_Subtype_Is_Constrained_Array constant into
the computation of Rewrite_As_Renaming and remove the constant.
Set it to True for an aliased array with unconstrained nominal
subtype if the subtype of the expression is also unconstrained.
Diffstat (limited to 'gcc/gdbhooks.py')
0 files changed, 0 insertions, 0 deletions