diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2023-04-17 15:19:06 +0200 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2023-05-30 09:12:17 +0200 |
commit | 4f061cf29a348178e084ef179a23c6b950a0e283 (patch) | |
tree | 1eb71f298055a668e1c2212d86d520f243c2e6b1 /gcc/ada/gcc-interface/decl.cc | |
parent | c8df233586990a903afe3b017d24541bc4689f08 (diff) | |
download | gcc-4f061cf29a348178e084ef179a23c6b950a0e283.zip gcc-4f061cf29a348178e084ef179a23c6b950a0e283.tar.gz gcc-4f061cf29a348178e084ef179a23c6b950a0e283.tar.bz2 |
ada: Small cleanups and fixes in expansion of aggregates
This streamlines the handling of qualified expressions in the expansion of
aggregates and plugs a couple of loopholes that may cause memory leaks.
gcc/ada/
* exp_aggr.adb (Build_Array_Aggr_Code): Move the declaration of Typ
to the beginning.
(Initialize_Array_Component): Test the unqualified version of the
expression for the nested array case.
(Initialize_Ctrl_Array_Component): Do not duplicate the expression
here. Do the pattern matching of the unqualified version of it.
(Gen_Assign): Call Unqualify to compute Expr_Q and use Expr_Q in
subsequent pattern matching.
(Initialize_Ctrl_Record_Component): Do the pattern matching of the
unqualified version of the aggregate.
(Build_Record_Aggr_Code): Call Unqualify.
(Convert_Aggr_In_Assignment): Likewise.
(Convert_Aggr_In_Object_Decl): Likewise.
(Component_OK_For_Backend): Likewise.
(Is_Delayed_Aggregate): Likewise.
Diffstat (limited to 'gcc/ada/gcc-interface/decl.cc')
0 files changed, 0 insertions, 0 deletions