diff options
author | Olivier Hainque <hainque@adacore.com> | 2015-11-23 11:20:34 +0000 |
---|---|---|
committer | Olivier Hainque <hainque@gcc.gnu.org> | 2015-11-23 11:20:34 +0000 |
commit | 0ab0bf955aa7940b6ed5e4790183c298b864201a (patch) | |
tree | 267b1724f61677cc6d135ffc9cc85a5cab60ec2a /gcc/ada/exp_sel.adb | |
parent | f119bebb36fc3680e94123630f57357d1ae571f6 (diff) | |
download | gcc-0ab0bf955aa7940b6ed5e4790183c298b864201a.zip gcc-0ab0bf955aa7940b6ed5e4790183c298b864201a.tar.gz gcc-0ab0bf955aa7940b6ed5e4790183c298b864201a.tar.bz2 |
opt.ads (Exception_Mechanism): Now three values: Front_End_SJLJ, Back_End_SJLJ and Back_End_ZCX.
2015-11-23 Olivier Hainque <hainque@adacore.com>
Eric Botcazou <botcazou@adacore.com>
* opt.ads (Exception_Mechanism): Now three values: Front_End_SJLJ,
Back_End_SJLJ and Back_End_ZCX.
(Back_End_Exceptions, Front_End_Exceptions, ZCX_Exceptions,
SJLJ_Exceptions): New functions, reflecting properties of the current
Exception_Mechanism.
* opt.adb: Implement the new functions.
* fe.h: Bind the new Exception_Mechanism and helper functions for gigi.
* exp_ch11.adb (Expand_At_End_Handler): Replace test on mechanism by
use of property helper and update comments.
(Expand_Exception_Handlers): Replace tests on mechanism by use of
helper. Restrict Abort_Defer to ZCX specifically.
* exp_ch9.adb (Expand_N_Asynchronous_Select): Replace tests on
mechanism by calls to helper functions. Abort_Undefer for ZCX only,
paired with Expand_Exception_Handlers.
* exp_sel.adb (Build_Abort_Block_Handler): Replace tests on mechanism
by calls to helper functions. Abort_Undefer for ZCX only, paired with
Expand_Exception_Handlers.
* lib-writ.ads (P line documentation): Add entry for "FX",
representative of unit compiled with Frontend_Exceptions True.
* lib-writ.adb (Output_Main_Program_Line): Add "FX" on P line if
compiled with Frontend_Exceptions True.
* ali.ads (ALIs_Record): Ada a Frontend_Exceptions component, to reflect
whether the ALI file contained an "FX" indication on the P line.
(Frontend_Exceptions_Specified): New boolean, to keep track of whether
at least an FX ALI file is in the closure.
* ali.adb (Scan_ALI): Handle "FX" on the P line.
(Initialize_ALI): Initialize Frontend_Exceptions_Specified to False.
* targparm.ads: Update desription of exception schemes.
(Frontend_Exceptions_On_Target): New flag, reflect Frontend_Exceptions
set to True in system.ads, or not set at all.
* targparm.adb (Targparm_Tags): Add FEX to convey Frontend_Exceptions.
Rename ZCD to ZCX for consistency.
(FEX_Str, Targparm_Str, Get_Target_Parameters): Adjust accordingly.
* gnat1drv.adb (Adjust_Global_Switches): Adjust Exception_Mechanism
setting, now from combination of Frontend_Exceptions and ZCX_By_Default.
* bcheck.adb (Check_Consistent_Zero_Cost_Exception_Handling): Rename
as ...
(Check_Consistent_Exception_Handling): Check consistency of both
ZCX_By_Default and Frontend_Exceptions.
(Check_Configuration_Consistency): Check_Consistent_Exception_Handling
if either flag was set at least once.
* make.adb (Check): Remove processing of a possible -fsjlj coming from
lang-specs.h.
* gnatlink.adb (Gnatlin): Likewise.
* gcc-interface/Makefile.in (gnatlib-sjlj/zcx): Now set
both ZCX_By_Default and Frontend_Exceptions.
* gcc-interface/decl.c (gnat_to_gnu_entity, case E_Variable):
Use eh property helper to test for back-end exceptions. Adjust
mechanism name when testing for front-end sjlj.
(case E_Procedure): Likewise.
* gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu):
Likewise, and rename local variables.
(Exception_Handler_to_gnu_sjlj): Rename as
Exception_Handler_to_gnu_fe_sjlj.
(Exception_Handler_to_gnu_zcx): Rename as
Exception_Handler_to_gnu_gcc and adjust tests on eh mechanisms
to use property helpers or correct mechanism name.
Co-Authored-By: Eric Botcazou <ebotcazou@adacore.com>
From-SVN: r230752
Diffstat (limited to 'gcc/ada/exp_sel.adb')
-rw-r--r-- | gcc/ada/exp_sel.adb | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/gcc/ada/exp_sel.adb b/gcc/ada/exp_sel.adb index 5bf33bc2..06895d7 100644 --- a/gcc/ada/exp_sel.adb +++ b/gcc/ada/exp_sel.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2013, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2015, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -73,15 +73,14 @@ package body Exp_Sel is Stmt : Node_Id; begin - if Exception_Mechanism = Back_End_Exceptions then - -- With ZCX, aborts are not defered in handlers + -- With ZCX exceptions, aborts are not defered in handlers. With SJLJ, + -- they are deferred at the beginning of Abort_Signal handlers. + if ZCX_Exceptions then Stmt := Make_Null_Statement (Loc); - else - -- With FE SJLJ, aborts are defered at the beginning of Abort_Signal - -- handlers. + else Stmt := Make_Procedure_Call_Statement (Loc, Name => New_Occurrence_Of (RTE (RE_Abort_Undefer), Loc), |