public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r11-6125] [Ada] Simplify membership tests with N_Subprogram_Call subtype
@ 2020-12-16 13:02 Pierre-Marie de Rodat
0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2020-12-16 13:02 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:612c48b13b38c42094059350d945f9d29983491a
commit r11-6125-g612c48b13b38c42094059350d945f9d29983491a
Author: Piotr Trojanek <trojanek@adacore.com>
Date: Sun Nov 29 22:20:09 2020 +0100
[Ada] Simplify membership tests with N_Subprogram_Call subtype
gcc/ada/
* exp_ch6.adb, exp_util.adb, sem_ch4.adb, sem_disp.adb,
sem_elab.adb: Simplify membership test.
Diff:
---
gcc/ada/exp_ch6.adb | 3 +--
gcc/ada/exp_util.adb | 3 +--
gcc/ada/sem_ch4.adb | 3 +--
gcc/ada/sem_disp.adb | 2 +-
gcc/ada/sem_elab.adb | 4 ++--
5 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb
index afe7e8ba63e..4e0559ce140 100644
--- a/gcc/ada/exp_ch6.adb
+++ b/gcc/ada/exp_ch6.adb
@@ -3491,8 +3491,7 @@ package body Exp_Ch6 is
-- of the dimension I/O packages.
if Ada_Version >= Ada_2012
- and then
- Nkind (Call_Node) in N_Procedure_Call_Statement | N_Function_Call
+ and then Nkind (Call_Node) in N_Subprogram_Call
and then Present (Parameter_Associations (Call_Node))
then
Expand_Put_Call_With_Symbol (Call_Node);
diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb
index bcfedfb32bd..0e458a3ef20 100644
--- a/gcc/ada/exp_util.adb
+++ b/gcc/ada/exp_util.adb
@@ -12247,8 +12247,7 @@ package body Exp_Util is
-- and view swaps, the parent type is taken from the formal
-- parameter of the subprogram being called.
- if Nkind (Context) in
- N_Function_Call | N_Procedure_Call_Statement
+ if Nkind (Context) in N_Subprogram_Call
and then No (Type_Map.Get (Entity (Name (Context))))
then
New_Ref :=
diff --git a/gcc/ada/sem_ch4.adb b/gcc/ada/sem_ch4.adb
index 7b358d43b41..9f7652b8630 100644
--- a/gcc/ada/sem_ch4.adb
+++ b/gcc/ada/sem_ch4.adb
@@ -8088,8 +8088,7 @@ package body Sem_Ch4 is
-- resolution does not depend on the type of the parameter that
-- includes the indexing operation.
- elsif Nkind (Parent (Par)) in
- N_Function_Call | N_Procedure_Call_Statement
+ elsif Nkind (Parent (Par)) in N_Subprogram_Call
and then Is_Entity_Name (Name (Parent (Par)))
then
declare
diff --git a/gcc/ada/sem_disp.adb b/gcc/ada/sem_disp.adb
index cf54337631d..36efa42ee3b 100644
--- a/gcc/ada/sem_disp.adb
+++ b/gcc/ada/sem_disp.adb
@@ -625,7 +625,7 @@ package body Sem_Disp is
Par := Parent (Par);
end if;
- if Nkind (Par) in N_Function_Call | N_Procedure_Call_Statement
+ if Nkind (Par) in N_Subprogram_Call
and then Is_Entity_Name (Name (Par))
then
declare
diff --git a/gcc/ada/sem_elab.adb b/gcc/ada/sem_elab.adb
index 399aeb48444..89b6e13e1ff 100644
--- a/gcc/ada/sem_elab.adb
+++ b/gcc/ada/sem_elab.adb
@@ -3744,7 +3744,7 @@ package body Sem_Elab is
Set_Is_Dispatching_Call
(Marker,
- Nkind (N) in N_Function_Call | N_Procedure_Call_Statement
+ Nkind (N) in N_Subprogram_Call
and then Present (Controlling_Argument (N)));
Set_Is_Elaboration_Checks_OK_Node
@@ -19368,7 +19368,7 @@ package body Sem_Elab is
function Is_Call_Of_Generic_Formal (N : Node_Id) return Boolean is
begin
- return Nkind (N) in N_Function_Call | N_Procedure_Call_Statement
+ return Nkind (N) in N_Subprogram_Call
-- Always return False if debug flag -gnatd.G is set
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-12-16 13:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-16 13:02 [gcc r11-6125] [Ada] Simplify membership tests with N_Subprogram_Call subtype Pierre-Marie de Rodat
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).