aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_aggr.ads
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@gcc.gnu.org>2020-05-12 22:34:50 +0200
committerEric Botcazou <ebotcazou@gcc.gnu.org>2020-05-12 22:35:55 +0200
commit27c3d986c4e704336c17155c558911beff1e1385 (patch)
treea379266065b29cc139d58be43dfaf7ab977e7c34 /gcc/ada/sem_aggr.ads
parent90b160f8ec515f54ddc36519a6aaa60abdabdec1 (diff)
downloadgcc-27c3d986c4e704336c17155c558911beff1e1385.zip
gcc-27c3d986c4e704336c17155c558911beff1e1385.tar.gz
gcc-27c3d986c4e704336c17155c558911beff1e1385.tar.bz2
Be prepared for more aggregates in gigi
This makes sure that gigi is prepared to handle more aggregates in the special memset code path. * sem_aggr.ads (Is_Single_Aggregate): New function. * sem_aggr.adb (Is_Others_Aggregate): Use local variable. (Is_Single_Aggregate): New function to recognize an aggregate with a single association containing a single choice. * fe.h (Is_Others_Aggregate): Delete. (Is_Single_Aggregate): New declaration. * gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>: Call Is_Single_Aggregate instead of Is_Others_Aggregate.
Diffstat (limited to 'gcc/ada/sem_aggr.ads')
-rw-r--r--gcc/ada/sem_aggr.ads3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/ada/sem_aggr.ads b/gcc/ada/sem_aggr.ads
index 1d4f348..13519a2 100644
--- a/gcc/ada/sem_aggr.ads
+++ b/gcc/ada/sem_aggr.ads
@@ -37,6 +37,9 @@ package Sem_Aggr is
function Is_Others_Aggregate (Aggr : Node_Id) return Boolean;
-- Returns True is aggregate Aggr consists of a single OTHERS choice
+ function Is_Single_Aggregate (Aggr : Node_Id) return Boolean;
+ -- Returns True is aggregate Aggr consists of a single choice
+
-- WARNING: There is a matching C declaration of this subprogram in fe.h
end Sem_Aggr;