aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/class.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2020-05-29 16:30:54 +0200
committerPierre-Marie de Rodat <derodat@adacore.com>2020-07-10 05:16:22 -0400
commitb748c3d1b7223cc1dd83a6965d51914968dd0d60 (patch)
treec3c87cca0d8999941a9bb039124f795c84c23f88 /gcc/cp/class.c
parent98af369b9489b0e8080d603239ef441051529dce (diff)
downloadgcc-b748c3d1b7223cc1dd83a6965d51914968dd0d60.zip
gcc-b748c3d1b7223cc1dd83a6965d51914968dd0d60.tar.gz
gcc-b748c3d1b7223cc1dd83a6965d51914968dd0d60.tar.bz2
[Ada] Further improve the expansion of array aggregates
gcc/ada/ * exp_aggr.adb (Convert_To_Positional): Add Dims local variable and pass it in calls to Is_Flat and Flatten. (Check_Static_Components): Pass Dims in call to Is_Static_Element. (Nonflattenable_Next_Aggr): New predicate. (Flatten): Add Dims parameter and Expr local variable. Call Nonflattenable_Next_Aggr in a couple of places. In the case when an Others choice is present, check that the element is either static or a nested aggregate that can be flattened, before disregarding the replication limit for elaboration purposes. Check that a nested array is flattenable in the case of a multidimensional array in any position. Remove redundant check in the Others case and pass Dims in call to Is_Static_Element. Use Expr variable. (Is_Flat): Change type of Dims parameter from Int to Nat. (Is_Static_Element): Add Dims parameter. Replace tests on literals with call to Compile_Time_Known_Value. If everything else failed and the dimension is 1, preanalyze the expression before calling again Compile_Time_Known_Value on it. Return true for null. (Late_Expansion): Do not expand further if the assignment to the target can be done directly by the back end.
Diffstat (limited to 'gcc/cp/class.c')
0 files changed, 0 insertions, 0 deletions