From 504775519d3199ea89400f85a599cb791f736cb7 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Tue, 11 Dec 2018 11:10:27 +0000 Subject: [Ada] Complete implementation of RM C.6(19) clause This ensures that the compiler fully implements the C.6(19) clause of the Ada Reference Manual and gives a warning when the clause does change the passing mechanism of the affected parameter. 2018-12-11 Eric Botcazou gcc/ada/ * fe.h (Is_Atomic_Object): Declare. (Is_Volatile_Object): Likewise. * gcc-interface/trans.c (atomic_or_volatile_copy_required_p): New. (Call_to_gnu): Generate a copy for an actual parameter passed by reference if the conditions set forth by RM C.6(19) are met and specificially deal with an atomic actual parameter. gcc/testsuite/ * gnat.dg/atomic11.adb, gnat.dg/atomic11_pkg1.ads, gnat.dg/atomic11_pkg2.ads: New testcase. From-SVN: r266993 --- gcc/ada/fe.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gcc/ada/fe.h') diff --git a/gcc/ada/fe.h b/gcc/ada/fe.h index c85d69c..cbd3ee2 100644 --- a/gcc/ada/fe.h +++ b/gcc/ada/fe.h @@ -281,13 +281,17 @@ extern Boolean Is_OK_Static_Subtype (Entity_Id); #define Defining_Entity sem_util__defining_entity #define First_Actual sem_util__first_actual #define Next_Actual sem_util__next_actual +#define Is_Atomic_Object sem_util__is_atomic_object #define Is_Variable_Size_Record sem_util__is_variable_size_record +#define Is_Volatile_Object sem_util__is_volatile_object #define Requires_Transient_Scope sem_util__requires_transient_scope extern Entity_Id Defining_Entity (Node_Id); extern Node_Id First_Actual (Node_Id); extern Node_Id Next_Actual (Node_Id); +extern Boolean Is_Atomic_Object (Node_Id); extern Boolean Is_Variable_Size_Record (Entity_Id Id); +extern Boolean Is_Volatile_Object (Node_Id); extern Boolean Requires_Transient_Scope (Entity_Id); /* sinfo: */ -- cgit v1.1