From 0d66b5969fec023f9aa6c297ba8550f5621cb2ea Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Mon, 18 Apr 2016 11:57:49 +0200 Subject: [multiple changes] 2016-04-18 Ed Schonberg * sem_disp.adb (Check_Dispatching_Call): Major rewriting to handle some complex cases of tag indeterminate calls that are actuals in other dispatching calls that are themselves tag indeterminate. (Check_Dispatching_Context): Add parameter to support recursive check for an enclosing construct that may provide a tag for a tag-indeterminate call. 2016-04-18 Hristian Kirtchev * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add global variables Task_Input_Seen and Task_Output_Seen. (Analyze_Global_Item): Detect an illegal use of the current instance of a single protected/task type in a global annotation. (Analyze_Input_Output): Inputs and output related to the current instance of a task unit are now tracked. (Check_Usage): Require the presence of the current instance of a task unit only when one input/output is available. (Current_Task_Instance_Seen): New routine. (Is_CCT_Instance): New parameter profile. Update the comment on usage. The routine now properly recognizes several cases related to single protected/task types. 2016-04-18 Hristian Kirtchev * freeze.adb (Freeze_Entity): Use New_Freeze_Node to create a brand new freeze node. This handles a case where an ignored Ghost context is freezing something which is not ignored Ghost and whose freeze node should not be removed from the tree. (New_Freeze_Node): New routine. 2016-04-18 Jerome Lambourg * sigtramp.h (__gnat_set_is_vxsim) New function to tell sigtramp-vxworks to handle vxsim signal contexts. * sigtramp-vxworks.c (__gnat_sigtramp) Take into account the differences in the sigcontext structure between the expected regular x86 or x86_64 ones and the ones received in case of exexution on the vxworks simulator. * init.c: also compute is_vxsim in case of x86_64-vx7 target. Provide this information to sigtramp-vxworks.c. Remove the old mechanism for vxsim. * init-vxsim.c, sigtramp-vxworks-vxsim.c: remove, now obsolete. 2016-04-18 Eric Botcazou * exp_ch3.adb (Inline_Init_Proc): New function returning whether the initialization procedure of a type should be inlined. Return again True for controlled type themselves. (Build_Array_Init_Proc): Call it to set Set_Is_Inlined on Init_Proc. (Build_Record_Init_Proc): Likewise. From-SVN: r235110 --- gcc/ada/init.c | 44 ++++++++++++++++---------------------------- 1 file changed, 16 insertions(+), 28 deletions(-) (limited to 'gcc/ada/init.c') diff --git a/gcc/ada/init.c b/gcc/ada/init.c index ae9b58e..43ea1e7 100644 --- a/gcc/ada/init.c +++ b/gcc/ada/init.c @@ -1705,10 +1705,12 @@ __gnat_install_handler (void) #include #include -#if defined (__i386__) && !defined (VTHREADS) +#if (defined (__i386__) || defined (__x86_64__)) && !defined (VTHREADS) #include #endif +#include "sigtramp.h" + #ifndef __RTP__ #include #include @@ -1814,7 +1816,9 @@ __gnat_clear_exception_count (void) /* Handle different SIGnal to exception mappings in different VxWorks versions. */ void -__gnat_map_signal (int sig, siginfo_t *si ATTRIBUTE_UNUSED, void *sc) +__gnat_map_signal (int sig, + siginfo_t *si ATTRIBUTE_UNUSED, + void *sc ATTRIBUTE_UNUSED) { struct Exception_Data *exception; const char *msg; @@ -1924,14 +1928,6 @@ __gnat_map_signal (int sig, siginfo_t *si ATTRIBUTE_UNUSED, void *sc) Raise_From_Signal_Handler (exception, msg); } -#if defined (__i386__) && !defined (VTHREADS) && _WRS_VXWORKS_MAJOR < 7 - -extern void -__gnat_vxsim_error_handler (int sig, siginfo_t *si, void *sc); - -static int is_vxsim = 0; -#endif - #if defined (ARMEL) && (_WRS_VXWORKS_MAJOR >= 7) /* ARM-vx7 case with arm unwinding exceptions */ @@ -2015,19 +2011,8 @@ __gnat_error_handler (int sig, siginfo_t *si, void *sc) __gnat_adjust_context_for_raise (sig, sc); #endif -#if defined (__i386__) && !defined (VTHREADS) && (__WRS_VXWORKS_MAJOR < 7) - /* On x86, the vxsim signal context is subtly different and is processeed - by a handler compiled especially for vxsim. - Vxsim is not supported anymore on our vxworks-7 port. */ - - if (is_vxsim) - __gnat_vxsim_error_handler (sig, si, sc); -#endif - -# include "sigtramp.h" - __gnat_sigtramp (sig, (void *)si, (void *)sc, - (__sigtramphandler_t *)&__gnat_map_signal); + (__sigtramphandler_t *)&__gnat_map_signal); #else __gnat_map_signal (sig, si, sc); @@ -2057,7 +2042,6 @@ void __gnat_install_handler (void) { struct sigaction act; - char *model ATTRIBUTE_UNUSED; /* Setup signal handler to map synchronous signals to appropriate exceptions. Make sure that the handler isn't interrupted by another @@ -2108,13 +2092,17 @@ __gnat_install_handler (void) trap_0_entry->inst_fourth = 0xa1480000; #endif -#if defined (__i386__) && !defined (VTHREADS) && _WRS_VXWORKS_MAJOR != 7 +#ifdef __HANDLE_VXSIM_SC /* By experiment, found that sysModel () returns the following string prefix for vxsim when running on Linux and Windows. */ - model = sysModel (); - if ((strncmp (model, "Linux", 5) == 0) - || (strncmp (model, "Windows", 7) == 0)) - is_vxsim = 1; + { + char *model = sysModel (); + if ((strncmp (model, "Linux", 5) == 0) + || (strncmp (model, "Windows", 7) == 0) + || (strncmp (model, "SIMLINUX", 8) == 0) /* vx7 */ + || (strncmp (model, "SIMWINDOWS", 10) == 0)) /* ditto */ + __gnat_set_is_vxsim (TRUE); + } #endif __gnat_handler_installed = 1; -- cgit v1.1