diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2010-10-19 12:23:10 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2010-10-19 12:23:10 +0200 |
commit | 462027293874eb55bf0da3468f5635bc9f550ed3 (patch) | |
tree | 6dd5b3cd3d0d61fd317c6e454f8441d066577898 /gcc/ada/init.c | |
parent | 6c946a9fc31118ae37f00dbb168e17dec1ac9a7b (diff) | |
download | gcc-462027293874eb55bf0da3468f5635bc9f550ed3.zip gcc-462027293874eb55bf0da3468f5635bc9f550ed3.tar.gz gcc-462027293874eb55bf0da3468f5635bc9f550ed3.tar.bz2 |
[multiple changes]
2010-10-19 Tristan Gingold <gingold@adacore.com>
* init.c: On Alpha/VMS, only adjust PC for HPARITH.
2010-10-19 Tristan Gingold <gingold@adacore.com>
* sem_attr.adb (Eval_Attribute): Handle Attribute_Ref, which can be
evaluated on VMS.
2010-10-19 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb (Check_Generic_Child_Unit): Handle properly the case of
an instantiation of a renaming of the implicit generic child that
appears within an instance of its parent.
2010-10-19 Thomas Quinot <quinot@adacore.com>
* exp_ch9.adb: Minor reformatting.
* einfo.adb, einfo.ads, atree.adb, atree.ads, exp_dist.adb, atree.h:
(Referenced_Object): Remove unused entity attribute.
(Direct_Primitive_Operations): Move to Elist10, this is set for all
tagged types, including synchronous ones, so can't use field15 which is
used as Storage_Size_Variable for task types and Entry_Bodies_Array for
protected types.
(Add_RACW_Primitive_Declarations_And_Bodies): Remove bogus guard
against Concurrent_Types (we must handle the case of a RACW designating
a class-wide private synchronous type).
Use Direct_Primitive_Operations, not Primitive_Operations, since we
really want the former.
2010-10-19 Bob Duff <duff@adacore.com>
* sem_ch8.adb (Pop_Scope): Change "return;" to "raise Program_Error;".
2010-10-19 Javier Miranda <miranda@adacore.com>
* exp_ch4.adb (Expand_Set_Membership.Make_Cond): Add missing support
for N_Range nodes.
From-SVN: r165689
Diffstat (limited to 'gcc/ada/init.c')
-rw-r--r-- | gcc/ada/init.c | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/gcc/ada/init.c b/gcc/ada/init.c index 766dbdd..60b7cfd 100644 --- a/gcc/ada/init.c +++ b/gcc/ada/init.c @@ -1396,13 +1396,13 @@ __gnat_handle_vms_condition (int *sigargs, void *mechargs) exception = &storage_error; msg = "stack overflow (or erroneous memory access)"; } - __gnat_adjust_context_for_raise (0, (void *)mechargs); + __gnat_adjust_context_for_raise (SS$_ACCVIO, (void *)mechargs); break; case SS$_STKOVF: exception = &storage_error; msg = "stack overflow"; - __gnat_adjust_context_for_raise (0, (void *)mechargs); + __gnat_adjust_context_for_raise (SS$_STKOVF, (void *)mechargs); break; case SS$_HPARITH: @@ -1411,11 +1411,7 @@ __gnat_handle_vms_condition (int *sigargs, void *mechargs) #else exception = &constraint_error; msg = "arithmetic error"; -#ifndef __alpha__ - /* No need to adjust pc on Alpha: the pc is already on the instruction - after the trapping one. */ - __gnat_adjust_context_for_raise (0, (void *)mechargs); -#endif + __gnat_adjust_context_for_raise (SS$_HPARITH, (void *)mechargs); #endif break; @@ -1491,17 +1487,20 @@ __gnat_install_handler (void) void __gnat_adjust_context_for_raise (int signo ATTRIBUTE_UNUSED, void *ucontext) { - /* Add one to the address of the instruction signaling the condition, - located in the sigargs array. */ + if (signo == SS$_HPARITH) + { + /* Sub one to the address of the instruction signaling the condition, + located in the sigargs array. */ - CHF$MECH_ARRAY * mechargs = (CHF$MECH_ARRAY *) ucontext; - CHF$SIGNAL_ARRAY * sigargs - = (CHF$SIGNAL_ARRAY *) mechargs->chf$q_mch_sig_addr; + CHF$MECH_ARRAY * mechargs = (CHF$MECH_ARRAY *) ucontext; + CHF$SIGNAL_ARRAY * sigargs + = (CHF$SIGNAL_ARRAY *) mechargs->chf$q_mch_sig_addr; - int vcount = sigargs->chf$is_sig_args; - int * pc_slot = & (&sigargs->chf$l_sig_name)[vcount-2]; + int vcount = sigargs->chf$is_sig_args; + int * pc_slot = & (&sigargs->chf$l_sig_name)[vcount-2]; - (*pc_slot) ++; + (*pc_slot)--; + } } #endif |