]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Ada] Remove front-end SJLJ processing
authorArnaud Charlet <charlet@adacore.com>
Sun, 6 Feb 2022 16:06:36 +0000 (16:06 +0000)
committerPierre-Marie de Rodat <derodat@adacore.com>
Thu, 12 May 2022 12:38:39 +0000 (12:38 +0000)
We no longer use the so called front-end SJLJ exception mechanism, so
get rid of it.

gcc/ada/

* ali.adb, ali.ads, bcheck.adb, exp_ch11.adb, fe.h,
gnat1drv.adb, opt.adb, opt.ads, targparm.adb, targparm.ads,
lib-writ.adb: Get rid of Frontend_Exceptions processing.
* libgnat/system-aix.ads, libgnat/system-darwin-arm.ads,
libgnat/system-darwin-ppc.ads, libgnat/system-darwin-x86.ads,
libgnat/system-djgpp.ads, libgnat/system-dragonfly-x86_64.ads,
libgnat/system-freebsd.ads, libgnat/system-hpux-ia64.ads,
libgnat/system-hpux.ads, libgnat/system-linux-alpha.ads,
libgnat/system-linux-arm.ads, libgnat/system-linux-hppa.ads,
libgnat/system-linux-ia64.ads, libgnat/system-linux-m68k.ads,
libgnat/system-linux-mips.ads, libgnat/system-linux-ppc.ads,
libgnat/system-linux-riscv.ads, libgnat/system-linux-s390.ads,
libgnat/system-linux-sh4.ads, libgnat/system-linux-sparc.ads,
libgnat/system-linux-x86.ads, libgnat/system-lynxos178-ppc.ads,
libgnat/system-lynxos178-x86.ads, libgnat/system-mingw.ads,
libgnat/system-qnx-aarch64.ads, libgnat/system-rtems.ads,
libgnat/system-solaris-sparc.ads,
libgnat/system-solaris-x86.ads,
libgnat/system-vxworks-arm-rtp-smp.ads,
libgnat/system-vxworks-arm-rtp.ads,
libgnat/system-vxworks-arm.ads,
libgnat/system-vxworks-e500-kernel.ads,
libgnat/system-vxworks-e500-rtp-smp.ads,
libgnat/system-vxworks-e500-rtp.ads,
libgnat/system-vxworks-ppc-kernel.ads,
libgnat/system-vxworks-ppc-rtp-smp.ads,
libgnat/system-vxworks-ppc-rtp.ads,
libgnat/system-vxworks-x86-kernel.ads,
libgnat/system-vxworks-x86-rtp-smp.ads,
libgnat/system-vxworks-x86-rtp.ads,
libgnat/system-vxworks7-aarch64-rtp-smp.ads,
libgnat/system-vxworks7-aarch64.ads,
libgnat/system-vxworks7-arm-rtp-smp.ads,
libgnat/system-vxworks7-arm.ads,
libgnat/system-vxworks7-e500-kernel.ads,
libgnat/system-vxworks7-e500-rtp-smp.ads,
libgnat/system-vxworks7-e500-rtp.ads,
libgnat/system-vxworks7-ppc-kernel.ads,
libgnat/system-vxworks7-ppc-rtp-smp.ads,
libgnat/system-vxworks7-ppc-rtp.ads,
libgnat/system-vxworks7-ppc64-kernel.ads,
libgnat/system-vxworks7-ppc64-rtp-smp.ads,
libgnat/system-vxworks7-x86-kernel.ads,
libgnat/system-vxworks7-x86-rtp-smp.ads,
libgnat/system-vxworks7-x86-rtp.ads,
libgnat/system-vxworks7-x86_64-kernel.ads,
libgnat/system-vxworks7-x86_64-rtp-smp.ads: Remove
Frontend_Exceptions line.
* gcc-interface/decl.cc, gcc-interface/trans.cc
(gnat_to_gnu_entity, gnat_to_gnu_subprog_type, gigi,
gnat_to_gnu): Remove Front_End_SJLJ processing and always assume
Back_End_Exceptions.

70 files changed:
gcc/ada/ali.adb
gcc/ada/ali.ads
gcc/ada/bcheck.adb
gcc/ada/exp_ch11.adb
gcc/ada/fe.h
gcc/ada/gcc-interface/decl.cc
gcc/ada/gcc-interface/trans.cc
gcc/ada/gnat1drv.adb
gcc/ada/lib-writ.adb
gcc/ada/libgnat/system-aix.ads
gcc/ada/libgnat/system-darwin-arm.ads
gcc/ada/libgnat/system-darwin-ppc.ads
gcc/ada/libgnat/system-darwin-x86.ads
gcc/ada/libgnat/system-djgpp.ads
gcc/ada/libgnat/system-dragonfly-x86_64.ads
gcc/ada/libgnat/system-freebsd.ads
gcc/ada/libgnat/system-hpux-ia64.ads
gcc/ada/libgnat/system-hpux.ads
gcc/ada/libgnat/system-linux-alpha.ads
gcc/ada/libgnat/system-linux-arm.ads
gcc/ada/libgnat/system-linux-hppa.ads
gcc/ada/libgnat/system-linux-ia64.ads
gcc/ada/libgnat/system-linux-m68k.ads
gcc/ada/libgnat/system-linux-mips.ads
gcc/ada/libgnat/system-linux-ppc.ads
gcc/ada/libgnat/system-linux-riscv.ads
gcc/ada/libgnat/system-linux-s390.ads
gcc/ada/libgnat/system-linux-sh4.ads
gcc/ada/libgnat/system-linux-sparc.ads
gcc/ada/libgnat/system-linux-x86.ads
gcc/ada/libgnat/system-lynxos178-ppc.ads
gcc/ada/libgnat/system-lynxos178-x86.ads
gcc/ada/libgnat/system-mingw.ads
gcc/ada/libgnat/system-qnx-aarch64.ads
gcc/ada/libgnat/system-rtems.ads
gcc/ada/libgnat/system-solaris-sparc.ads
gcc/ada/libgnat/system-solaris-x86.ads
gcc/ada/libgnat/system-vxworks-arm-rtp-smp.ads
gcc/ada/libgnat/system-vxworks-arm-rtp.ads
gcc/ada/libgnat/system-vxworks-arm.ads
gcc/ada/libgnat/system-vxworks-e500-kernel.ads
gcc/ada/libgnat/system-vxworks-e500-rtp-smp.ads
gcc/ada/libgnat/system-vxworks-e500-rtp.ads
gcc/ada/libgnat/system-vxworks-ppc-kernel.ads
gcc/ada/libgnat/system-vxworks-ppc-rtp-smp.ads
gcc/ada/libgnat/system-vxworks-ppc-rtp.ads
gcc/ada/libgnat/system-vxworks-x86-kernel.ads
gcc/ada/libgnat/system-vxworks-x86-rtp-smp.ads
gcc/ada/libgnat/system-vxworks-x86-rtp.ads
gcc/ada/libgnat/system-vxworks7-aarch64-rtp-smp.ads
gcc/ada/libgnat/system-vxworks7-aarch64.ads
gcc/ada/libgnat/system-vxworks7-arm-rtp-smp.ads
gcc/ada/libgnat/system-vxworks7-arm.ads
gcc/ada/libgnat/system-vxworks7-e500-kernel.ads
gcc/ada/libgnat/system-vxworks7-e500-rtp-smp.ads
gcc/ada/libgnat/system-vxworks7-e500-rtp.ads
gcc/ada/libgnat/system-vxworks7-ppc-kernel.ads
gcc/ada/libgnat/system-vxworks7-ppc-rtp-smp.ads
gcc/ada/libgnat/system-vxworks7-ppc-rtp.ads
gcc/ada/libgnat/system-vxworks7-ppc64-kernel.ads
gcc/ada/libgnat/system-vxworks7-ppc64-rtp-smp.ads
gcc/ada/libgnat/system-vxworks7-x86-kernel.ads
gcc/ada/libgnat/system-vxworks7-x86-rtp-smp.ads
gcc/ada/libgnat/system-vxworks7-x86-rtp.ads
gcc/ada/libgnat/system-vxworks7-x86_64-kernel.ads
gcc/ada/libgnat/system-vxworks7-x86_64-rtp-smp.ads
gcc/ada/opt.adb
gcc/ada/opt.ads
gcc/ada/targparm.adb
gcc/ada/targparm.ads

index 984e9ca7c5a60c58c4d359265292b8f319197aa1..90fcfad5bbe8b598d9228eb45ff8903978486664 100644 (file)
@@ -670,7 +670,6 @@ package body ALI is
       SSO_Default_Specified                  := False;
       Task_Dispatching_Policy_Specified      := ' ';
       Unreserve_All_Interrupts_Specified     := False;
-      Frontend_Exceptions_Specified          := False;
       Zero_Cost_Exceptions_Specified         := False;
    end Initialize_ALI;
 
@@ -1774,7 +1773,6 @@ package body ALI is
         Unit_Exception_Table         => False,
         Ver                          => (others => ' '),
         Ver_Len                      => 0,
-        Frontend_Exceptions          => False,
         Zero_Cost_Exceptions         => False);
 
       --  Now we acquire the input lines from the ALI file. Note that the
@@ -1971,9 +1969,10 @@ package body ALI is
             elsif C = 'F' then
                C := Getc;
 
+               --  Old front-end exceptions marker, ignore
+
                if C = 'X' then
-                  ALIs.Table (Id).Frontend_Exceptions := True;
-                  Frontend_Exceptions_Specified := True;
+                  null;
                else
                   Fatal_Error_Ignore;
                end if;
index 8d6dd90043db0beb5d5615bb0bd38ebe43b1f764..7419c57191f464619970d011068d3228ea0d725e 100644 (file)
@@ -247,10 +247,6 @@ package ALI is
       --  Set to True if unit exception table pointer generated. Not set if 'P'
       --  appears in Ignore_Lines.
 
-      Frontend_Exceptions : Boolean;
-      --  Set to True if file was compiled with front-end exceptions. Not set
-      --  if 'P' appears in Ignore_Lines.
-
       Zero_Cost_Exceptions : Boolean;
       --  Set to True if file was compiled with zero cost exceptions. Not set
       --  if 'P' appears in Ignore_Lines.
@@ -559,10 +555,6 @@ package ALI is
    --  Set to False by Initialize_ALI. Set to True if Scan_ALI reads
    --  a unit for which dynamic elaboration checking is enabled.
 
-   Frontend_Exceptions_Specified : Boolean := False;
-   --  Set to False by Initialize_ALI. Set to True if an ali file is read that
-   --  has a P line specifying the generation of front-end exceptions.
-
    GNATprove_Mode_Specified : Boolean := False;
    --  Set to True if an ali file was produced in GNATprove mode.
 
index f773778e77c81c06f12c07ab615106eb9b4d8621..edab9858312669ceffc14f7c88b6ec760546f20f 100644 (file)
@@ -94,9 +94,7 @@ package body Bcheck is
          Check_Consistent_SSO_Default;
       end if;
 
-      if Zero_Cost_Exceptions_Specified
-        or else Frontend_Exceptions_Specified
-      then
+      if Zero_Cost_Exceptions_Specified then
          Check_Consistent_Exception_Handling;
       end if;
 
@@ -1245,11 +1243,8 @@ package body Bcheck is
    procedure Check_Consistent_Exception_Handling is
    begin
       Check_Mechanism : for A1 in ALIs.First + 1 .. ALIs.Last loop
-         if (ALIs.Table (A1).Zero_Cost_Exceptions /=
-              ALIs.Table (ALIs.First).Zero_Cost_Exceptions)
-           or else
-            (ALIs.Table (A1).Frontend_Exceptions /=
-              ALIs.Table (ALIs.First).Frontend_Exceptions)
+         if ALIs.Table (A1).Zero_Cost_Exceptions /=
+             ALIs.Table (ALIs.First).Zero_Cost_Exceptions
          then
             Error_Msg_File_1 := ALIs.Table (A1).Sfile;
             Error_Msg_File_2 := ALIs.Table (ALIs.First).Sfile;
index 00b7745f7e1b14d3a652eff90da4fa98a927ddc5..1867469bf9f9e8ffcb95441ca7044b8c8ba438b7 100644 (file)
@@ -41,7 +41,6 @@ with Restrict;       use Restrict;
 with Rident;         use Rident;
 with Rtsfind;        use Rtsfind;
 with Sem;            use Sem;
-with Sem_Ch8;        use Sem_Ch8;
 with Sem_Res;        use Sem_Res;
 with Sem_Util;       use Sem_Util;
 with Sinfo;          use Sinfo;
@@ -76,113 +75,18 @@ package body Exp_Ch11 is
    ---------------------------
 
    --  For a handled statement sequence that has a cleanup (At_End_Proc
-   --  field set), an exception handler of the following form is required:
+   --  field set), perform any needed expansion.
 
-   --     exception
-   --       when all others =>
-   --          cleanup call
-   --          raise;
-
-   --  Note: this exception handler is treated rather specially by
-   --  subsequent expansion in two respects:
-
-   --    The normal call to Undefer_Abort is omitted
-   --    The raise call does not do Defer_Abort
-
-   --  This is because the current tasking code seems to assume that
-   --  the call to the cleanup routine that is made from an exception
-   --  handler for the abort signal is called with aborts deferred.
-
-   --  This expansion is only done if we have front end exception handling.
-   --  If we have back end exception handling, then the AT END handler is
-   --  left alone, and cleanups (including the exceptional case) are handled
-   --  by the back end.
-
-   --  In the front end case, the exception handler described above handles
-   --  the exceptional case. The AT END handler is left in the generated tree
-   --  and the code generator (e.g. gigi) must still handle proper generation
-   --  of cleanup calls for the non-exceptional case.
+   --  Do nothing by default. We used to perform a special expansion for
+   --  front-end SJLJ, and we may want to customize this processing in
+   --  the future for new back-ends.
 
    procedure Expand_At_End_Handler (HSS : Node_Id; Blk_Id : Entity_Id) is
-      Clean   : constant Entity_Id  := Entity (At_End_Proc (HSS));
-      Ohandle : Node_Id;
-      Stmnts  : List_Id;
-
-      Loc : constant Source_Ptr := No_Location;
-      --  Location used for expansion. We quite deliberately do not set a
-      --  specific source location for the expanded handler. This makes
-      --  sense since really the handler is not associated with specific
-      --  source. We used to set this to Sloc (Clean), but that caused
-      --  useless and annoying bouncing around of line numbers in the
-      --  debugger in some circumstances.
-
+      pragma Unreferenced (Blk_Id);
    begin
-      pragma Assert (Present (Clean));
+      pragma Assert (Present (Entity (At_End_Proc (HSS))));
       pragma Assert (No (Exception_Handlers (HSS)));
-
-      --  Back end exception schemes don't need explicit handlers to
-      --  trigger AT-END actions on exceptional paths.
-
-      if Back_End_Exceptions then
-         return;
-      end if;
-
-      --  Don't expand an At End handler if we have already had configurable
-      --  run-time violations, since likely this will just be a matter of
-      --  generating useless cascaded messages
-
-      if Configurable_Run_Time_Violations > 0 then
-         return;
-      end if;
-
-      --  Don't expand an At End handler if we are not allowing exceptions
-      --  or if exceptions are transformed into local gotos, and never
-      --  propagated (No_Exception_Propagation).
-
-      if No_Exception_Handlers_Set then
-         return;
-      end if;
-
-      if Present (Blk_Id) then
-         Push_Scope (Blk_Id);
-      end if;
-
-      Ohandle :=
-        Make_Others_Choice (Loc);
-      Set_All_Others (Ohandle);
-
-      Stmnts := New_List (
-        Make_Procedure_Call_Statement (Loc,
-          Name => New_Occurrence_Of (Clean, Loc)));
-
-      --  Generate reraise statement as last statement of AT-END handler,
-      --  unless we are under control of No_Exception_Propagation, in which
-      --  case no exception propagation is possible anyway, so we do not need
-      --  a reraise (the AT END handler in this case is only for normal exits
-      --  not for exceptional exits). Also, we flag the Reraise statement as
-      --  being part of an AT END handler to prevent signalling this reraise
-      --  as a violation of the restriction when it is not set.
-
-      if not Restriction_Active (No_Exception_Propagation) then
-         declare
-            Rstm : constant Node_Id := Make_Raise_Statement (Loc);
-         begin
-            Set_From_At_End (Rstm);
-            Append_To (Stmnts, Rstm);
-         end;
-      end if;
-
-      Set_Exception_Handlers (HSS, New_List (
-        Make_Implicit_Exception_Handler (Loc,
-          Exception_Choices => New_List (Ohandle),
-          Statements        => Stmnts)));
-
-      Analyze_List (Stmnts, Suppress => All_Checks);
-      Expand_Exception_Handlers (HSS);
-
-      if Present (Blk_Id) then
-         Pop_Scope;
-      end if;
+      return;
    end Expand_At_End_Handler;
 
    -------------------------------
@@ -987,13 +891,11 @@ package body Exp_Ch11 is
                --        ...
                --     end;
 
-               --  This expansion is only performed when using front-end
-               --  exceptions. Gigi will insert a call to initialize the
-               --  choice parameter.
+               --  This expansion is only performed when using CodePeer.
+               --  Gigi will insert a call to initialize the choice parameter.
 
                if Present (Choice_Parameter (Handler))
-                 and then (Front_End_Exceptions
-                            or else CodePeer_Mode)
+                 and then CodePeer_Mode
                then
                   declare
                      Cparm : constant Entity_Id  := Choice_Parameter (Handler);
@@ -1717,9 +1619,7 @@ package body Exp_Ch11 is
          --  GNATprove all code with exceptions falls outside the subset of
          --  code which can be formally analyzed.
 
-         if not CodePeer_Mode
-           and then Back_End_Exceptions
-         then
+         if not CodePeer_Mode then
             return;
          end if;
 
index 4bdc023b9e52b25acae2043a26a8ec9f97390c8f..dc3a1af2dc66853be32fd17dc3628a7dfc129559 100644 (file)
@@ -219,7 +219,7 @@ typedef enum {
 } Ada_Version_Type;
 
 typedef enum {
-  Front_End_SJLJ, Back_End_ZCX, Back_End_SJLJ
+  Back_End_ZCX, Back_End_SJLJ
 } Exception_Mechanism_Type;
 
 extern Ada_Version_Type Ada_Version;
@@ -238,13 +238,9 @@ extern Boolean Suppress_Checks;
 
 #define ZCX_Exceptions         opt__zcx_exceptions
 #define SJLJ_Exceptions                opt__sjlj_exceptions
-#define Front_End_Exceptions   opt__front_end_exceptions
-#define Back_End_Exceptions    opt__back_end_exceptions
 
 extern Boolean ZCX_Exceptions          (void);
 extern Boolean SJLJ_Exceptions         (void);
-extern Boolean Front_End_Exceptions    (void);
-extern Boolean Back_End_Exceptions     (void);
 
 /* restrict: */
 
index d52c4fb362332c0b402fb512d8495cf205e5bf38..56ad4998e2286c58fbb0eaf9ac74bc7d9d82e87f 100644 (file)
@@ -1597,14 +1597,6 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition)
        if (TREE_CODE (gnu_decl) == CONST_DECL)
          DECL_CONST_ADDRESS_P (gnu_decl) = constructor_address_p (gnu_expr);
 
-       /* If this object is declared in a block that contains a block with an
-          exception handler, and we aren't using the GCC exception mechanism,
-          we must force this variable in memory in order to avoid an invalid
-          optimization.  */
-       if (Front_End_Exceptions ()
-           && Has_Nested_Block_With_Handler (Scope (gnat_entity)))
-         TREE_ADDRESSABLE (gnu_decl) = 1;
-
        /* If this is a local variable with non-BLKmode and aggregate type,
           and optimization isn't enabled, then force it in memory so that
           a register won't be allocated to it with possible subparts left
@@ -1618,24 +1610,6 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition)
                 && !optimize)
          TREE_ADDRESSABLE (gnu_decl) = 1;
 
-       /* If we are defining an object with variable size or an object with
-          fixed size that will be dynamically allocated, and we are using the
-          front-end setjmp/longjmp exception mechanism, update the setjmp
-          buffer.  */
-       if (definition
-           && Exception_Mechanism == Front_End_SJLJ
-           && get_block_jmpbuf_decl ()
-           && DECL_SIZE_UNIT (gnu_decl)
-           && (TREE_CODE (DECL_SIZE_UNIT (gnu_decl)) != INTEGER_CST
-               || (flag_stack_check == GENERIC_STACK_CHECK
-                   && compare_tree_int (DECL_SIZE_UNIT (gnu_decl),
-                                        STACK_CHECK_MAX_VAR_SIZE) > 0)))
-         add_stmt_with_node (build_call_n_expr
-                             (update_setjmp_buf_decl, 1,
-                              build_unary_op (ADDR_EXPR, NULL_TREE,
-                                              get_block_jmpbuf_decl ())),
-                             gnat_entity);
-
        /* Back-annotate Esize and Alignment of the object if not already
           known.  Note that we pick the values of the type, not those of
           the object, to shield ourselves from low-level platform-dependent
@@ -5801,7 +5775,7 @@ gnat_to_gnu_subprog_type (Entity_Id gnat_subprog, bool definition,
      circuitry from it, we need to declare that calls to pure Ada subprograms
      that can throw have side effects, since they can trigger an "abnormal"
      transfer of control; therefore they cannot be "pure" in the GCC sense.  */
-  bool pure_flag = Is_Pure (gnat_subprog) && Back_End_Exceptions ();
+  bool pure_flag = Is_Pure (gnat_subprog);
   bool return_by_direct_ref_p = false;
   bool return_by_invisi_ref_p = false;
   bool return_unconstrained_p = false;
index 39059cb69a456665ba18cdb707a7bf703b8a2a48..5741986183803bd2a90bd9e1654095d8ac73bac1 100644 (file)
@@ -666,9 +666,7 @@ gigi (Node_Id gnat_root,
 
   main_identifier_node = get_identifier ("main");
 
-  /* If we are using the GCC exception mechanism, let GCC know.  */
-  if (Back_End_Exceptions ())
-    gnat_init_gcc_eh ();
+  gnat_init_gcc_eh ();
 
   /* Initialize the GCC support for FP operations.  */
   gnat_init_gcc_fp ();
@@ -5361,26 +5359,16 @@ Handled_Sequence_Of_Statements_to_gnu (Node_Id gnat_node)
 {
   /* If just annotating, ignore all EH and cleanups.  */
   const bool gcc_eh
-    = (!type_annotate_only
-       && Present (Exception_Handlers (gnat_node))
-       && Back_End_Exceptions ());
-  const bool fe_sjlj_eh
-    = (!type_annotate_only
-       && Present (Exception_Handlers (gnat_node))
-       && Exception_Mechanism == Front_End_SJLJ);
+    = !type_annotate_only && Present (Exception_Handlers (gnat_node));
   const bool at_end = !type_annotate_only && Present (At_End_Proc (gnat_node));
-  const bool binding_for_block = (at_end || gcc_eh || fe_sjlj_eh);
-  tree gnu_jmpsave_decl = NULL_TREE;
-  tree gnu_jmpbuf_decl = NULL_TREE;
+  const bool binding_for_block = (at_end || gcc_eh);
   tree gnu_inner_block; /* The statement(s) for the block itself.  */
   tree gnu_result;
-  tree gnu_expr;
   Node_Id gnat_temp;
 
-  /* The GCC exception handling mechanism can handle both ZCX and SJLJ schemes
-     and the front-end has its own SJLJ mechanism.  To call the GCC mechanism,
-     we call add_cleanup, and when we leave the binding, end_stmt_group will
-     create the TRY_FINALLY_EXPR construct.
+  /* The GCC exception handling mechanism can handle both ZCX and SJLJ schemes.
+     To call the GCC mechanism, we call add_cleanup, and when we leave the
+     binding, end_stmt_group will create the TRY_FINALLY_EXPR construct.
 
      ??? The region level calls down there have been specifically put in place
      for a ZCX context and currently the order in which things are emitted
@@ -5390,45 +5378,13 @@ Handled_Sequence_Of_Statements_to_gnu (Node_Id gnat_node)
      condition to make it not ZCX specific.
 
      If there are any exceptions or cleanup processing involved, we need an
-     outer statement group (for front-end SJLJ) and binding level.  */
+     outer statement group and binding level.  */
   if (binding_for_block)
     {
       start_stmt_group ();
       gnat_pushlevel ();
     }
 
-  /* If using fe_sjlj_eh, make the variables for the setjmp buffer and save
-     area for address of previous buffer.  Do this first since we need to have
-     the setjmp buf known for any decls in this block.  */
-  if (fe_sjlj_eh)
-    {
-      gnu_jmpsave_decl
-       = create_var_decl (get_identifier ("JMPBUF_SAVE"), NULL_TREE,
-                          jmpbuf_ptr_type,
-                          build_call_n_expr (get_jmpbuf_decl, 0),
-                          false, false, false, false, false, true, false,
-                          NULL, gnat_node);
-
-      /* The __builtin_setjmp receivers will immediately reinstall it.  Now
-        because of the unstructured form of EH used by fe_sjlj_eh, there
-        might be forward edges going to __builtin_setjmp receivers on which
-        it is uninitialized, although they will never be actually taken.  */
-      suppress_warning (gnu_jmpsave_decl, OPT_Wuninitialized);
-      gnu_jmpbuf_decl
-       = create_var_decl (get_identifier ("JMP_BUF"), NULL_TREE,
-                          jmpbuf_type,
-                          NULL_TREE,
-                          false, false, false, false, false, true, false,
-                          NULL, gnat_node);
-
-      set_block_jmpbuf_decl (gnu_jmpbuf_decl);
-
-      /* When we exit this block, restore the saved value.  */
-      add_cleanup (build_call_n_expr (set_jmpbuf_decl, 1, gnu_jmpsave_decl),
-                  Present (End_Label (gnat_node))
-                  ? End_Label (gnat_node) : gnat_node);
-    }
-
   /* If we are to call a function when exiting this block, add a cleanup
      to the binding level we made above.  Note that add_cleanup is FIFO
      so we must register this cleanup after the EH cleanup just above.  */
@@ -5449,19 +5405,10 @@ Handled_Sequence_Of_Statements_to_gnu (Node_Id gnat_node)
                   ? End_Label (gnat_node) : At_End_Proc (gnat_node));
     }
 
-  /* Now build the tree for the declarations and statements inside this block.
-     If this is SJLJ, set our jmp_buf as the current buffer.  */
+  /* Now build the tree for the declarations and statements inside this
+     block.  */
   start_stmt_group ();
 
-  if (fe_sjlj_eh)
-    {
-      gnu_expr = build_call_n_expr (set_jmpbuf_decl, 1,
-                                   build_unary_op (ADDR_EXPR, NULL_TREE,
-                                                   gnu_jmpbuf_decl));
-      set_expr_location_from_node (gnu_expr, gnat_node);
-      add_stmt (gnu_expr);
-    }
-
   if (Present (First_Real_Statement (gnat_node)))
     process_decls (Statements (gnat_node), Empty,
                   First_Real_Statement (gnat_node), true, true);
@@ -5475,81 +5422,7 @@ Handled_Sequence_Of_Statements_to_gnu (Node_Id gnat_node)
 
   gnu_inner_block = end_stmt_group ();
 
-  /* Now generate code for the two exception models, if either is relevant for
-     this block.  */
-  if (fe_sjlj_eh)
-    {
-      tree *gnu_else_ptr = 0;
-      tree gnu_handler;
-
-      /* Make a binding level for the exception handling declarations and code
-        and set up gnu_except_ptr_stack for the handlers to use.  */
-      start_stmt_group ();
-      gnat_pushlevel ();
-
-      vec_safe_push (gnu_except_ptr_stack,
-                    create_var_decl (get_identifier ("EXCEPT_PTR"), NULL_TREE,
-                                     build_pointer_type (except_type_node),
-                                     build_call_n_expr (get_excptr_decl, 0),
-                                     false, false, false, false, false,
-                                     true, false, NULL, gnat_node));
-
-      /* Generate code for each handler. The N_Exception_Handler case does the
-        real work and returns a COND_EXPR for each handler, which we chain
-        together here.  */
-      for (gnat_temp = First_Non_Pragma (Exception_Handlers (gnat_node));
-          Present (gnat_temp); gnat_temp = Next_Non_Pragma (gnat_temp))
-       {
-         gnu_expr = gnat_to_gnu (gnat_temp);
-
-         /* If this is the first one, set it as the outer one. Otherwise,
-            point the "else" part of the previous handler to us. Then point
-            to our "else" part.  */
-         if (!gnu_else_ptr)
-           add_stmt (gnu_expr);
-         else
-           *gnu_else_ptr = gnu_expr;
-
-         gnu_else_ptr = &COND_EXPR_ELSE (gnu_expr);
-       }
-
-      /* If none of the exception handlers did anything, re-raise but do not
-        defer abortion.  */
-      gnu_expr = build_call_n_expr (raise_nodefer_decl, 1,
-                                   gnu_except_ptr_stack->last ());
-      set_expr_location_from_node
-       (gnu_expr,
-        Present (End_Label (gnat_node)) ? End_Label (gnat_node) : gnat_node);
-
-      if (gnu_else_ptr)
-       *gnu_else_ptr = gnu_expr;
-      else
-       add_stmt (gnu_expr);
-
-      /* End the binding level dedicated to the exception handlers and get the
-        whole statement group.  */
-      gnu_except_ptr_stack->pop ();
-      gnat_poplevel ();
-      gnu_handler = end_stmt_group ();
-
-      /* If the setjmp returns 1, we restore our incoming longjmp value and
-        then check the handlers.  */
-      start_stmt_group ();
-      add_stmt_with_node (build_call_n_expr (set_jmpbuf_decl, 1,
-                                            gnu_jmpsave_decl),
-                         gnat_node);
-      add_stmt (gnu_handler);
-      gnu_handler = end_stmt_group ();
-
-      /* This block is now "if (setjmp) ... <handlers> else <block>".  */
-      gnu_result = build3 (COND_EXPR, void_type_node,
-                          (build_call_n_expr
-                           (setjmp_decl, 1,
-                            build_unary_op (ADDR_EXPR, NULL_TREE,
-                                            gnu_jmpbuf_decl))),
-                          gnu_handler, gnu_inner_block);
-    }
-  else if (gcc_eh)
+  if (gcc_eh)
     {
       tree gnu_handlers;
       location_t locus;
@@ -5592,75 +5465,6 @@ Handled_Sequence_Of_Statements_to_gnu (Node_Id gnat_node)
   return gnu_result;
 }
 
-/* Subroutine of gnat_to_gnu to translate gnat_node, an N_Exception_Handler,
-   to a GCC tree, which is returned.  This is the variant for front-end sjlj
-   exception handling.  */
-
-static tree
-Exception_Handler_to_gnu_fe_sjlj (Node_Id gnat_node)
-{
-  /* Unless this is "Others" or the special "Non-Ada" exception for Ada, make
-     an "if" statement to select the proper exceptions.  For "Others", exclude
-     exceptions where Handled_By_Others is nonzero unless the All_Others flag
-     is set. For "Non-ada", accept an exception if "Lang" is 'V'.  */
-  tree gnu_choice = boolean_false_node;
-  tree gnu_body = build_stmt_group (Statements (gnat_node), false);
-  Node_Id gnat_temp;
-
-  for (gnat_temp = First (Exception_Choices (gnat_node));
-       gnat_temp; gnat_temp = Next (gnat_temp))
-    {
-      tree this_choice;
-
-      if (Nkind (gnat_temp) == N_Others_Choice)
-       {
-         if (All_Others (gnat_temp))
-           this_choice = boolean_true_node;
-         else
-           this_choice
-             = build_binary_op
-               (EQ_EXPR, boolean_type_node,
-                convert
-                (integer_type_node,
-                 build_component_ref
-                 (build_unary_op
-                  (INDIRECT_REF, NULL_TREE,
-                   gnu_except_ptr_stack->last ()),
-                  not_handled_by_others_decl,
-                  false)),
-                integer_zero_node);
-       }
-
-      else if (Nkind (gnat_temp) == N_Identifier
-              || Nkind (gnat_temp) == N_Expanded_Name)
-       {
-         Entity_Id gnat_ex_id = Entity (gnat_temp);
-         tree gnu_expr;
-
-         /* Exception may be a renaming. Recover original exception which is
-            the one elaborated and registered.  */
-         if (Present (Renamed_Object (gnat_ex_id)))
-           gnat_ex_id = Renamed_Object (gnat_ex_id);
-
-         gnu_expr = gnat_to_gnu_entity (gnat_ex_id, NULL_TREE, false);
-
-         this_choice
-           = build_binary_op
-             (EQ_EXPR, boolean_type_node,
-              gnu_except_ptr_stack->last (),
-              convert (TREE_TYPE (gnu_except_ptr_stack->last ()),
-                       build_unary_op (ADDR_EXPR, NULL_TREE, gnu_expr)));
-       }
-      else
-       gcc_unreachable ();
-
-      gnu_choice = build_binary_op (TRUTH_ORIF_EXPR, boolean_type_node,
-                                   gnu_choice, this_choice);
-    }
-
-  return build3 (COND_EXPR, void_type_node, gnu_choice, gnu_body, NULL_TREE);
-}
-
 /* Return true if no statement in GNAT_LIST can alter the control flow.  */
 
 static bool
@@ -7871,30 +7675,16 @@ gnat_to_gnu (Node_Id gnat_node)
     /***************************/
 
     case N_Handled_Sequence_Of_Statements:
-      /* If there is an At_End procedure attached to this node, and the EH
-        mechanism is front-end, we must have at least a corresponding At_End
-        handler, unless the No_Exception_Handlers restriction is set.  */
-      gcc_assert (type_annotate_only
-                 || !Front_End_Exceptions ()
-                 || No (At_End_Proc (gnat_node))
-                 || Present (Exception_Handlers (gnat_node))
-                 || No_Exception_Handlers_Set ());
-
       gnu_result = Handled_Sequence_Of_Statements_to_gnu (gnat_node);
       break;
 
     case N_Exception_Handler:
-      if (Back_End_Exceptions ())
-       gnu_result = Exception_Handler_to_gnu_gcc (gnat_node);
-      else if (Exception_Mechanism == Front_End_SJLJ)
-       gnu_result = Exception_Handler_to_gnu_fe_sjlj (gnat_node);
-      else
-       gcc_unreachable ();
+      gnu_result = Exception_Handler_to_gnu_gcc (gnat_node);
       break;
 
     case N_Raise_Statement:
       /* Only for reraise in back-end exceptions mode.  */
-      gcc_assert (No (Name (gnat_node)) && Back_End_Exceptions ());
+      gcc_assert (No (Name (gnat_node)));
 
       start_stmt_group ();
 
index 0a11619db9f7d4b1a8147a89c7d7760ba20c41ca..39fa9bee9a780ac49ce2af78fe8ce04b1f9250f7 100644 (file)
@@ -631,28 +631,11 @@ procedure Gnat1drv is
       --  generating code.
 
       if Operating_Mode = Generate_Code then
-         case Targparm.Frontend_Exceptions_On_Target is
-            when True =>
-               case Targparm.ZCX_By_Default_On_Target is
-                  when True =>
-                     Write_Line
-                       ("Run-time library configured incorrectly");
-                     Write_Line
-                       ("(requesting support for Frontend ZCX exceptions)");
-                     raise Unrecoverable_Error;
-
-                  when False =>
-                     Exception_Mechanism := Front_End_SJLJ;
-               end case;
-
-            when False =>
-               case Targparm.ZCX_By_Default_On_Target is
-                  when True =>
-                     Exception_Mechanism := Back_End_ZCX;
-                  when False =>
-                     Exception_Mechanism := Back_End_SJLJ;
-               end case;
-         end case;
+         if Targparm.ZCX_By_Default_On_Target then
+            Exception_Mechanism := Back_End_ZCX;
+         else
+            Exception_Mechanism := Back_End_SJLJ;
+         end if;
       end if;
 
       --  Set proper status for overflow check mechanism
index 05571f2ea77166f494183b9fb44076404235f233..59a9170972b6b38222fb9457facfcb6af631c492 100644 (file)
@@ -1234,10 +1234,6 @@ package body Lib.Writ is
          Write_Info_Str (" UA");
       end if;
 
-      if Front_End_Exceptions then
-         Write_Info_Str (" FX");
-      end if;
-
       if ZCX_Exceptions then
          Write_Info_Str (" ZX");
       end if;
index c0163616a979c0dd34af9415817c4f23bb994944..57756d4ccc30c780524f5cde66108888c659306c 100644 (file)
@@ -150,7 +150,6 @@ private
    Always_Compatible_Rep     : constant Boolean := False;
    Suppress_Standard_Library : constant Boolean := False;
    Use_Ada_Main_Program_Name : constant Boolean := False;
-   Frontend_Exceptions       : constant Boolean := False;
    ZCX_By_Default            : constant Boolean := True;
 
 end System;
index be5d664246a17c18f3d1f658aea907135bbe65f6..7390f3a65e1fc60b7af2471525c1f0d4ce98febf 100644 (file)
@@ -166,7 +166,6 @@ private
    Always_Compatible_Rep     : constant Boolean := False;
    Suppress_Standard_Library : constant Boolean := False;
    Use_Ada_Main_Program_Name : constant Boolean := False;
-   Frontend_Exceptions       : constant Boolean := False;
    ZCX_By_Default            : constant Boolean := True;
 
 end System;
index dc3d6c4288470a8171c89a273e2b593f1de44286..984d5a2a646ad85797692cf088c966887c9e3198 100644 (file)
@@ -166,7 +166,6 @@ private
    Always_Compatible_Rep     : constant Boolean := False;
    Suppress_Standard_Library : constant Boolean := False;
    Use_Ada_Main_Program_Name : constant Boolean := False;
-   Frontend_Exceptions       : constant Boolean := False;
    ZCX_By_Default            : constant Boolean := True;
 
 end System;
index 378fa9bf89dfa853d8e7f7ca24bc3054a98272b9..8d8e5f04a80a01f3a0d31eefc489fed73f4c8172 100644 (file)
@@ -166,7 +166,6 @@ private
    Always_Compatible_Rep     : constant Boolean := False;
    Suppress_Standard_Library : constant Boolean := False;
    Use_Ada_Main_Program_Name : constant Boolean := False;
-   Frontend_Exceptions       : constant Boolean := False;
    ZCX_By_Default            : constant Boolean := True;
 
 end System;
index 31a5351a5ee363996fe655848e2558d6926d9c4f..1148a46c38a81bcc60515d1f956dc1319e51e3f3 100644 (file)
@@ -140,7 +140,6 @@ private
    Always_Compatible_Rep     : constant Boolean := False;
    Suppress_Standard_Library : constant Boolean := False;
    Use_Ada_Main_Program_Name : constant Boolean := False;
-   Frontend_Exceptions       : constant Boolean := False;
    ZCX_By_Default            : constant Boolean := True;
 
 end System;
index 37726fe57861012154c11a5d1a2eeb731976699d..90abfe9e4e54eb6b91fec39b31840a67a3b01a28 100644 (file)
@@ -140,7 +140,6 @@ private
    Always_Compatible_Rep     : constant Boolean := False;
    Suppress_Standard_Library : constant Boolean := False;
    Use_Ada_Main_Program_Name : constant Boolean := False;
-   Frontend_Exceptions       : constant Boolean := False;
    ZCX_By_Default            : constant Boolean := True;
 
 end System;
index 3604280337a70ccbde75f3aa3ae7e11057420d3f..fcc0c4f846f1c902ac315564c6362c42a7cde9bb 100644 (file)
@@ -141,7 +141,6 @@ private
    Always_Compatible_Rep     : constant Boolean := False;
    Suppress_Standard_Library : constant Boolean := False;
    Use_Ada_Main_Program_Name : constant Boolean := False;
-   Frontend_Exceptions       : constant Boolean := False;
    ZCX_By_Default            : constant Boolean := True;
 
 end System;
index 4268ff5f81668db938c6f9c629d39b234865e56b..0562bf74246348e46126f3a288b9bde9a6ad6808 100644 (file)
@@ -140,7 +140,6 @@ private
    Always_Compatible_Rep     : constant Boolean := False;
    Suppress_Standard_Library : constant Boolean := False;
    Use_Ada_Main_Program_Name : constant Boolean := False;
-   Frontend_Exceptions       : constant Boolean := False;
    ZCX_By_Default            : constant Boolean := True;
 
 end System;
index a4126458e3c54c9095ffb1ac0c6b976f9091db9d..a8848d63b6bf01d171849a4e0a4738c03ab33025 100644 (file)
@@ -139,7 +139,6 @@ private
    Always_Compatible_Rep     : constant Boolean := False;
    Suppress_Standard_Library : constant Boolean := False;
    Use_Ada_Main_Program_Name : constant Boolean := False;
-   Frontend_Exceptions       : constant Boolean := False;
    ZCX_By_Default            : constant Boolean := True;
 
    --------------------------
index b6f15501e7fe5169232bcd555924e212ba7844b5..56d708d5ee1c4649be0f6d88fab3959e1371d91d 100644 (file)
@@ -140,7 +140,6 @@ private
    Always_Compatible_Rep     : constant Boolean := False;
    Suppress_Standard_Library : constant Boolean := False;
    Use_Ada_Main_Program_Name : constant Boolean := False;
-   Frontend_Exceptions       : constant Boolean := False;
    ZCX_By_Default            : constant Boolean := True;
 
 end System;
index 10fc281726240461e1f3732a4de6d14de3e2323f..6f2cb247fec4b9484258d42fc7d22c61e297086b 100644 (file)
@@ -149,7 +149,6 @@ private
    Always_Compatible_Rep     : constant Boolean := False;
    Suppress_Standard_Library : constant Boolean := False;
    Use_Ada_Main_Program_Name : constant Boolean := False;
-   Frontend_Exceptions       : constant Boolean := False;
    ZCX_By_Default            : constant Boolean := True;
 
 end System;
index 9a40009ec365eaed14699d3faf069b780a4c94fe..d4b83646306933464158858b620d2cd9f655227b 100644 (file)
@@ -139,7 +139,6 @@ private
    Always_Compatible_Rep     : constant Boolean := False;
    Suppress_Standard_Library : constant Boolean := False;
    Use_Ada_Main_Program_Name : constant Boolean := False;
-   Frontend_Exceptions       : constant Boolean := False;
    ZCX_By_Default            : constant Boolean := True;
 
 end System;
index 85e9c9e64eb5aaabae6091be0776f0e1d0f0237b..0ebc23347ad92ecd19dbc7378cff706a8b3f355c 100644 (file)
@@ -148,7 +148,6 @@ private
    Always_Compatible_Rep     : constant Boolean := False;
    Suppress_Standard_Library : constant Boolean := False;
    Use_Ada_Main_Program_Name : constant Boolean := False;
-   Frontend_Exceptions       : constant Boolean := False;
    ZCX_By_Default            : constant Boolean := True;
 
 end System;
index 83ac5ea8d13c37dbaad665001a79ca59459dd29f..2189465e725f7a64775a40510c30531564ce6a6e 100644 (file)
@@ -150,7 +150,6 @@ private
    Always_Compatible_Rep     : constant Boolean := False;
    Suppress_Standard_Library : constant Boolean := False;
    Use_Ada_Main_Program_Name : constant Boolean := False;
-   Frontend_Exceptions       : constant Boolean := False;
    ZCX_By_Default            : constant Boolean := True;
 
 end System;
index 50138836acf770c35f05ef09990eb1a06f9127c6..d3bafb2f94441d2ed5a419a22cd465caae2aaf7d 100644 (file)
@@ -140,7 +140,6 @@ private
    Always_Compatible_Rep     : constant Boolean := False;
    Suppress_Standard_Library : constant Boolean := False;
    Use_Ada_Main_Program_Name : constant Boolean := False;
-   Frontend_Exceptions       : constant Boolean := False;
    ZCX_By_Default            : constant Boolean := True;
 
 end System;
index 84cf5321766eed8620b5bffe6285763ecde47318..0b8aad954a67221f32a8bc68dac9122d9958f657 100644 (file)
@@ -148,7 +148,6 @@ private
    Always_Compatible_Rep     : constant Boolean := False;
    Suppress_Standard_Library : constant Boolean := False;
    Use_Ada_Main_Program_Name : constant Boolean := False;
-   Frontend_Exceptions       : constant Boolean := False;
    ZCX_By_Default            : constant Boolean := True;
 
 end System;
index 56f4d09ffc127598484264131e2412a2bdef3fee..c65660427d2a87c09f4a1bde2763bb24e5c76729 100644 (file)
@@ -139,7 +139,6 @@ private
    Always_Compatible_Rep     : constant Boolean := False;
    Suppress_Standard_Library : constant Boolean := False;
    Use_Ada_Main_Program_Name : constant Boolean := False;
-   Frontend_Exceptions       : constant Boolean := False;
    ZCX_By_Default            : constant Boolean := True;
 
 end System;
index 24803e2d6e63d6d2ed5d660b53e2f56ea13343cd..ee1e87ad88c034455448e9bebbb16d3940c733c4 100644 (file)
@@ -139,7 +139,6 @@ private
    Always_Compatible_Rep     : constant Boolean := False;
    Suppress_Standard_Library : constant Boolean := False;
    Use_Ada_Main_Program_Name : constant Boolean := False;
-   Frontend_Exceptions       : constant Boolean := False;
    ZCX_By_Default            : constant Boolean := True;
 
 end System;
index 5cee7476e5909acac91c966774038817bc92b3e8..c4fb6ed96dd5006edb15c22deb2d8749dbe69364 100644 (file)
@@ -147,7 +147,6 @@ private
    Always_Compatible_Rep     : constant Boolean := False;
    Suppress_Standard_Library : constant Boolean := False;
    Use_Ada_Main_Program_Name : constant Boolean := False;
-   Frontend_Exceptions       : constant Boolean := False;
    ZCX_By_Default            : constant Boolean := True;
 
 end System;
index db46b7416db60f34960c9cef9158454504e8fff5..cc502da3e5b3b3d04515c8affae70413bdd17eeb 100644 (file)
@@ -139,7 +139,6 @@ private
    Always_Compatible_Rep     : constant Boolean := False;
    Suppress_Standard_Library : constant Boolean := False;
    Use_Ada_Main_Program_Name : constant Boolean := False;
-   Frontend_Exceptions       : constant Boolean := False;
    ZCX_By_Default            : constant Boolean := True;
 
 end System;
index 87eb9037abd3be42c79ae64e88267f12253cd43f..93362072f96a92307c5db791c8d30f019b893d10 100644 (file)
@@ -148,7 +148,6 @@ private
    Always_Compatible_Rep     : constant Boolean := False;
    Suppress_Standard_Library : constant Boolean := False;
    Use_Ada_Main_Program_Name : constant Boolean := False;
-   Frontend_Exceptions       : constant Boolean := False;
    ZCX_By_Default            : constant Boolean := True;
 
 end System;
index ebf8132c8dc63a018cbe104a5680f6ceeb0ca07d..2a693c531d74aa83b747b2a6903fef80c1974f5b 100644 (file)
@@ -154,7 +154,6 @@ private
    Always_Compatible_Rep     : constant Boolean := False;
    Suppress_Standard_Library : constant Boolean := False;
    Use_Ada_Main_Program_Name : constant Boolean := False;
-   Frontend_Exceptions       : constant Boolean := False;
    ZCX_By_Default            : constant Boolean := False;
 
 end System;
index 302a2f3b536f83e8a9e28687ebb2b6a68ad435f2..2f13aaeb09238ad7fd2f6f3878cc7583555c90d4 100644 (file)
@@ -154,7 +154,6 @@ private
    Always_Compatible_Rep     : constant Boolean := False;
    Suppress_Standard_Library : constant Boolean := False;
    Use_Ada_Main_Program_Name : constant Boolean := False;
-   Frontend_Exceptions       : constant Boolean := False;
    ZCX_By_Default            : constant Boolean := False;
 
 end System;
index 77fb6f093470aedf119d6c7417aa2ca9950aae3c..a2eaf6a306df3cbb7b3ed79e17938ae98c5f285d 100644 (file)
@@ -140,7 +140,6 @@ private
    Always_Compatible_Rep     : constant Boolean := False;
    Suppress_Standard_Library : constant Boolean := False;
    Use_Ada_Main_Program_Name : constant Boolean := False;
-   Frontend_Exceptions       : constant Boolean := False;
    ZCX_By_Default            : constant Boolean := True;
 
    ---------------------------
index 827f9df1b15c41da6ebbfac3a16a1f9e2584376c..7e61ae3caf403e33d5cbb11b6817b6b74057b4c4 100644 (file)
@@ -149,7 +149,6 @@ private
    Always_Compatible_Rep     : constant Boolean := False;
    Suppress_Standard_Library : constant Boolean := False;
    Use_Ada_Main_Program_Name : constant Boolean := False;
-   Frontend_Exceptions       : constant Boolean := False;
    ZCX_By_Default            : constant Boolean := True;
 
 end System;
index 06f78317a6d6d54545f9bab6d68b306e54591c04..5959b72405b58f8438b167551827e8642b72f3a2 100644 (file)
@@ -156,7 +156,6 @@ private
    Always_Compatible_Rep     : constant Boolean := False;
    Suppress_Standard_Library : constant Boolean := False;
    Use_Ada_Main_Program_Name : constant Boolean := False;
-   Frontend_Exceptions       : constant Boolean := False;
    ZCX_By_Default            : constant Boolean := True;
 
 end System;
index 2ba51989fb9650210fcd0f41e47244966c1171ae..c15a517c657653a2349ae5724f2c36419b04dcec 100644 (file)
@@ -140,7 +140,6 @@ private
    Always_Compatible_Rep     : constant Boolean := False;
    Suppress_Standard_Library : constant Boolean := False;
    Use_Ada_Main_Program_Name : constant Boolean := False;
-   Frontend_Exceptions       : constant Boolean := False;
    ZCX_By_Default            : constant Boolean := True;
 
 end System;
index 787252394a6248938be877d6c42a41845c35453c..981e7ca45b24a16bf67354b3727cceaceb2f30b2 100644 (file)
@@ -140,7 +140,6 @@ private
    Always_Compatible_Rep     : constant Boolean := False;
    Suppress_Standard_Library : constant Boolean := False;
    Use_Ada_Main_Program_Name : constant Boolean := False;
-   Frontend_Exceptions       : constant Boolean := False;
    ZCX_By_Default            : constant Boolean := True;
 
 end System;
index 42732452d3f932bd450f0b428852efaa7f1585ca..42d14c43cf7d4f7dfabd8d0fdfc0b543cdd9964d 100644 (file)
@@ -158,7 +158,6 @@ private
    Always_Compatible_Rep     : constant Boolean := False;
    Suppress_Standard_Library : constant Boolean := False;
    Use_Ada_Main_Program_Name : constant Boolean := False;
-   Frontend_Exceptions       : constant Boolean := False;
    ZCX_By_Default            : constant Boolean := True;
 
    Executable_Extension : constant String := ".vxe";
index 214e3d5faeb998f94be904bf7b00a68660c01522..aa8515ac95074d525add5e03d76441a838ebd462 100644 (file)
@@ -157,7 +157,6 @@ private
    Always_Compatible_Rep     : constant Boolean := False;
    Suppress_Standard_Library : constant Boolean := False;
    Use_Ada_Main_Program_Name : constant Boolean := False;
-   Frontend_Exceptions       : constant Boolean := False;
    ZCX_By_Default            : constant Boolean := True;
 
    Executable_Extension : constant String := ".vxe";
index be391d0d40233732ccbfcf307639bb7ec444b3ca..ae09b78c0b6c30295708d00239fe6a2c561a2a11 100644 (file)
@@ -152,7 +152,6 @@ private
    Always_Compatible_Rep     : constant Boolean := False;
    Suppress_Standard_Library : constant Boolean := False;
    Use_Ada_Main_Program_Name : constant Boolean := True;
-   Frontend_Exceptions       : constant Boolean := False;
    ZCX_By_Default            : constant Boolean := True;
 
    Executable_Extension : constant String := ".out";
index 9ee828bba47a27421d9e1c73d46828461d336500..4b091aef0691ae849d7c58fb86e1fec83052e6f9 100644 (file)
@@ -153,7 +153,6 @@ private
    Always_Compatible_Rep     : constant Boolean := False;
    Suppress_Standard_Library : constant Boolean := False;
    Use_Ada_Main_Program_Name : constant Boolean := True;
-   Frontend_Exceptions       : constant Boolean := False;
    ZCX_By_Default            : constant Boolean := True;
 
    Executable_Extension : constant String := ".out";
index d7ab0a9c182db2eb49f78fa94e6ec0d28ae881f2..a5d4d87fa43fa347d82543875a0418b538c7ebe0 100644 (file)
@@ -159,7 +159,6 @@ private
    Always_Compatible_Rep     : constant Boolean := False;
    Suppress_Standard_Library : constant Boolean := False;
    Use_Ada_Main_Program_Name : constant Boolean := False;
-   Frontend_Exceptions       : constant Boolean := False;
    ZCX_By_Default            : constant Boolean := True;
 
    Executable_Extension : constant String := ".vxe";
index e304d50f9daa798b9e90c5bfd50ead1aa578365f..4f96385d840a35a5eaee800b63322287df87e1b0 100644 (file)
@@ -157,7 +157,6 @@ private
    Always_Compatible_Rep     : constant Boolean := False;
    Suppress_Standard_Library : constant Boolean := False;
    Use_Ada_Main_Program_Name : constant Boolean := False;
-   Frontend_Exceptions       : constant Boolean := False;
    ZCX_By_Default            : constant Boolean := True;
 
    Executable_Extension : constant String := ".vxe";
index 6cf9b3f6a9f996e2fa32729b2e7d6c933939c61e..b8a0ba17735765270fa9176d80dce80fc12a10ab 100644 (file)
@@ -152,7 +152,6 @@ private
    Always_Compatible_Rep     : constant Boolean := False;
    Suppress_Standard_Library : constant Boolean := False;
    Use_Ada_Main_Program_Name : constant Boolean := True;
-   Frontend_Exceptions       : constant Boolean := False;
    ZCX_By_Default            : constant Boolean := True;
 
    Executable_Extension : constant String := ".out";
index 07da01d43b17e56cafd9b642f4826b45195640ac..ecfd7e695e7a5dc9debfabca08a28c7cefa2109f 100644 (file)
@@ -158,7 +158,6 @@ private
    Always_Compatible_Rep     : constant Boolean := False;
    Suppress_Standard_Library : constant Boolean := False;
    Use_Ada_Main_Program_Name : constant Boolean := False;
-   Frontend_Exceptions       : constant Boolean := False;
    ZCX_By_Default            : constant Boolean := True;
 
    Executable_Extension : constant String := ".vxe";
index b6807b3d1b558c02cef9456b64c07aff93031dfb..72fb96363efd01e37e3bc998cb3fcd5f305e6b99 100644 (file)
@@ -157,7 +157,6 @@ private
    Always_Compatible_Rep     : constant Boolean := False;
    Suppress_Standard_Library : constant Boolean := False;
    Use_Ada_Main_Program_Name : constant Boolean := False;
-   Frontend_Exceptions       : constant Boolean := False;
    ZCX_By_Default            : constant Boolean := True;
 
    Executable_Extension : constant String := ".vxe";
index c8cbf526d759cf85105c0ecd4fe500f7ef49a144..4c912b8e529229f0f2553c97b05b9b0b69bb0ca1 100644 (file)
@@ -156,7 +156,6 @@ private
    Always_Compatible_Rep     : constant Boolean := False;
    Suppress_Standard_Library : constant Boolean := False;
    Use_Ada_Main_Program_Name : constant Boolean := True;
-   Frontend_Exceptions       : constant Boolean := False;
    ZCX_By_Default            : constant Boolean := True;
 
    Executable_Extension : constant String := ".out";
index d70642e5e2cafebdf913e446022b7bafc120733f..f8115a5203406d6f9deeb61317eb643db57c4170 100644 (file)
@@ -157,7 +157,6 @@ private
    Always_Compatible_Rep     : constant Boolean := False;
    Suppress_Standard_Library : constant Boolean := False;
    Use_Ada_Main_Program_Name : constant Boolean := False;
-   Frontend_Exceptions       : constant Boolean := False;
    ZCX_By_Default            : constant Boolean := True;
 
    Executable_Extension : constant String := ".vxe";
index 262445d3632f2a5e28526624b0f76f0a1e8064cf..8894abbaab0a47c1c208e7d7eeee4711531c27cf 100644 (file)
@@ -156,7 +156,6 @@ private
    Always_Compatible_Rep     : constant Boolean := False;
    Suppress_Standard_Library : constant Boolean := False;
    Use_Ada_Main_Program_Name : constant Boolean := False;
-   Frontend_Exceptions       : constant Boolean := False;
    ZCX_By_Default            : constant Boolean := True;
 
    Executable_Extension : constant String := ".vxe";
index a739441cf4515ed7f1bbe23e43b7988592a0a112..0556cbf1226bef60556983371e08b1b412dc938c 100644 (file)
@@ -157,7 +157,6 @@ private
    Always_Compatible_Rep     : constant Boolean := False;
    Suppress_Standard_Library : constant Boolean := False;
    Use_Ada_Main_Program_Name : constant Boolean := False;
-   Frontend_Exceptions       : constant Boolean := False;
    ZCX_By_Default            : constant Boolean := True;
 
    Executable_Extension : constant String := ".vxe";
index 840682bbfd4a8059fc2055f0a2cf1ce6c486ffbf..8bf58b7c91aee1d24f904b75570113aec8c0b85b 100644 (file)
@@ -154,7 +154,6 @@ private
    Always_Compatible_Rep     : constant Boolean := False;
    Suppress_Standard_Library : constant Boolean := False;
    Use_Ada_Main_Program_Name : constant Boolean := True;
-   Frontend_Exceptions       : constant Boolean := False;
    ZCX_By_Default            : constant Boolean := True;
 
    Executable_Extension : constant String := ".out";
index c82f8fcaa5aa7c0056b9a59bfb97e315bcfb139b..1341b9d6a2ccf6dcc70371e3254ba194788f6b2d 100644 (file)
@@ -154,7 +154,6 @@ private
    Always_Compatible_Rep     : constant Boolean := False;
    Suppress_Standard_Library : constant Boolean := False;
    Use_Ada_Main_Program_Name : constant Boolean := False;
-   Frontend_Exceptions       : constant Boolean := False;
    ZCX_By_Default            : constant Boolean := True;
 
    Executable_Extension : constant String := ".vxe";
index be391d0d40233732ccbfcf307639bb7ec444b3ca..ae09b78c0b6c30295708d00239fe6a2c561a2a11 100644 (file)
@@ -152,7 +152,6 @@ private
    Always_Compatible_Rep     : constant Boolean := False;
    Suppress_Standard_Library : constant Boolean := False;
    Use_Ada_Main_Program_Name : constant Boolean := True;
-   Frontend_Exceptions       : constant Boolean := False;
    ZCX_By_Default            : constant Boolean := True;
 
    Executable_Extension : constant String := ".out";
index bb721578a642914b2553468a15f6079cab02fb82..c7b2c9719cf6e6e7402a99872c6d3b196771c9e5 100644 (file)
@@ -153,7 +153,6 @@ private
    Always_Compatible_Rep     : constant Boolean := False;
    Suppress_Standard_Library : constant Boolean := False;
    Use_Ada_Main_Program_Name : constant Boolean := True;
-   Frontend_Exceptions       : constant Boolean := False;
    ZCX_By_Default            : constant Boolean := True;
 
    Executable_Extension : constant String := ".out";
index d4b4dce03787a86707fc9a9a078af62daf215611..a9dbf9740e7fbf2469af4e95753ef4518328aa06 100644 (file)
@@ -158,7 +158,6 @@ private
    Always_Compatible_Rep     : constant Boolean := False;
    Suppress_Standard_Library : constant Boolean := False;
    Use_Ada_Main_Program_Name : constant Boolean := False;
-   Frontend_Exceptions       : constant Boolean := False;
    ZCX_By_Default            : constant Boolean := True;
 
    Executable_Extension : constant String := ".vxe";
index 7f7f817de8488b0a60f41d6c64c46f41160d432b..83e44cb2970c0caa35d1445897a64e820faac144 100644 (file)
@@ -157,7 +157,6 @@ private
    Always_Compatible_Rep     : constant Boolean := False;
    Suppress_Standard_Library : constant Boolean := False;
    Use_Ada_Main_Program_Name : constant Boolean := False;
-   Frontend_Exceptions       : constant Boolean := False;
    ZCX_By_Default            : constant Boolean := True;
 
    Executable_Extension : constant String := ".vxe";
index 2b83609aef55964a60aa2fccc1b1dab71547d96e..e7dfc29aa2a45c98308abf33a735a4708d8e1038 100644 (file)
@@ -152,7 +152,6 @@ private
    Always_Compatible_Rep     : constant Boolean := False;
    Suppress_Standard_Library : constant Boolean := False;
    Use_Ada_Main_Program_Name : constant Boolean := True;
-   Frontend_Exceptions       : constant Boolean := False;
    ZCX_By_Default            : constant Boolean := True;
 
    Executable_Extension : constant String := ".out";
index f232b3472ecc3691fe1e48de8b6f66cc2a1d8b9e..146a87be77549731a7a6de2d683ab7403658e0b4 100644 (file)
@@ -157,7 +157,6 @@ private
    Always_Compatible_Rep     : constant Boolean := False;
    Suppress_Standard_Library : constant Boolean := False;
    Use_Ada_Main_Program_Name : constant Boolean := False;
-   Frontend_Exceptions       : constant Boolean := False;
    ZCX_By_Default            : constant Boolean := True;
 
    Executable_Extension : constant String := ".vxe";
index 1c59debca78484286e4093c1740195087e3ef144..0e448d4eb577aaedeb4e3ad9c0e263def2ee2260 100644 (file)
@@ -157,7 +157,6 @@ private
    Always_Compatible_Rep     : constant Boolean := False;
    Suppress_Standard_Library : constant Boolean := False;
    Use_Ada_Main_Program_Name : constant Boolean := False;
-   Frontend_Exceptions       : constant Boolean := False;
    ZCX_By_Default            : constant Boolean := True;
 
    Executable_Extension : constant String := ".vxe";
index 942c4b1f06b59bb418cecf0b530ccde9da96600b..70c1e7c3abc3701085d3a14188d481dff2fd76ce 100644 (file)
@@ -154,7 +154,6 @@ private
    Always_Compatible_Rep     : constant Boolean := False;
    Suppress_Standard_Library : constant Boolean := False;
    Use_Ada_Main_Program_Name : constant Boolean := True;
-   Frontend_Exceptions       : constant Boolean := False;
    ZCX_By_Default            : constant Boolean := True;
 
    Executable_Extension : constant String := ".out";
index 42aeb34ce6948d88a344ca14c963722ae2cb8449..bb42c6a17bed650dceb68c072546fb2ea641ba9a 100644 (file)
@@ -157,7 +157,6 @@ private
    Always_Compatible_Rep     : constant Boolean := False;
    Suppress_Standard_Library : constant Boolean := False;
    Use_Ada_Main_Program_Name : constant Boolean := False;
-   Frontend_Exceptions       : constant Boolean := False;
    ZCX_By_Default            : constant Boolean := True;
 
    Executable_Extension : constant String := ".vxe";
index f84d8f0ca6a1b15f78d76270ff96af5f72359015..f7be01d059ef6a2bf9544176aa77c9f4fb64180b 100644 (file)
@@ -153,7 +153,6 @@ private
    Always_Compatible_Rep     : constant Boolean := False;
    Suppress_Standard_Library : constant Boolean := False;
    Use_Ada_Main_Program_Name : constant Boolean := True;
-   Frontend_Exceptions       : constant Boolean := False;
    ZCX_By_Default            : constant Boolean := True;
 
    Executable_Extension : constant String := ".out";
index 26e35ab8bdbabdafc387239dc19753a779dd1077..05cadbc23d95c7eef0277ce696a3699b109e1417 100644 (file)
@@ -156,7 +156,6 @@ private
    Always_Compatible_Rep     : constant Boolean := False;
    Suppress_Standard_Library : constant Boolean := False;
    Use_Ada_Main_Program_Name : constant Boolean := False;
-   Frontend_Exceptions       : constant Boolean := False;
    ZCX_By_Default            : constant Boolean := True;
 
    Executable_Extension : constant String := ".vxe";
index 9eb643c254f54448467a3bf27ff48f193803ae43..aebbfd74f01bce9f233e7a02c1d3de41e2c08e54 100644 (file)
@@ -156,7 +156,6 @@ private
    Always_Compatible_Rep     : constant Boolean := False;
    Suppress_Standard_Library : constant Boolean := False;
    Use_Ada_Main_Program_Name : constant Boolean := False;
-   Frontend_Exceptions       : constant Boolean := False;
    ZCX_By_Default            : constant Boolean := True;
 
    Executable_Extension : constant String := ".vxe";
index 6cdd59e7c7f751d0886d896674ce1d948701d19d..ed9850f54198d6534f8928062c418713699c7e3d 100644 (file)
@@ -153,7 +153,6 @@ private
    Always_Compatible_Rep     : constant Boolean := False;
    Suppress_Standard_Library : constant Boolean := False;
    Use_Ada_Main_Program_Name : constant Boolean := True;
-   Frontend_Exceptions       : constant Boolean := False;
    ZCX_By_Default            : constant Boolean := True;
 
    Executable_Extension : constant String := ".out";
index 47a91e626ebc72b905e29ddb7856c38224bc6ad9..3c98b4c2ff3ebc25fc0ddc560e5014da6d19c931 100644 (file)
@@ -156,7 +156,6 @@ private
    Always_Compatible_Rep     : constant Boolean := False;
    Suppress_Standard_Library : constant Boolean := False;
    Use_Ada_Main_Program_Name : constant Boolean := False;
-   Frontend_Exceptions       : constant Boolean := False;
    ZCX_By_Default            : constant Boolean := True;
 
    Executable_Extension : constant String := ".vxe";
index ae6b844052efff77db1a223dcde1ee48c5fc30ae..24f6cc9042278e3b626e78d8daaef8a71f57405b 100644 (file)
@@ -27,37 +27,13 @@ with Csets;          use Csets;
 
 package body Opt is
 
-   -------------------------
-   -- Back_End_Exceptions --
-   -------------------------
-
-   function Back_End_Exceptions return Boolean is
-   begin
-      return
-        Exception_Mechanism = Back_End_SJLJ
-          or else
-        Exception_Mechanism = Back_End_ZCX;
-   end Back_End_Exceptions;
-
-   -------------------------
-   -- Front_End_Exceptions --
-   -------------------------
-
-   function Front_End_Exceptions return Boolean is
-   begin
-      return Exception_Mechanism = Front_End_SJLJ;
-   end Front_End_Exceptions;
-
    --------------------
    -- SJLJ_Exceptions --
    --------------------
 
    function SJLJ_Exceptions return Boolean is
    begin
-      return
-        Exception_Mechanism = Back_End_SJLJ
-          or else
-        Exception_Mechanism = Front_End_SJLJ;
+      return Exception_Mechanism = Back_End_SJLJ;
    end SJLJ_Exceptions;
 
    --------------------
index c38a93f41ce084cc683ba931fd398277ae884dee..0d8b25f13a03f214a16e4679373a6c1cd2da7027 100644 (file)
@@ -567,13 +567,7 @@ package Opt is
    type Exception_Mechanism_Type is
    --  Determines the kind of mechanism used to handle exceptions
    --
-     (Front_End_SJLJ,
-      --  Exceptions use setjmp/longjmp generated explicitly by the front end
-      --  (this includes gigi or other equivalent parts of the code generator).
-      --  AT END handlers are converted into exception handlers by the front
-      --  end in this mode.
-
-      Back_End_ZCX,
+     (Back_End_ZCX,
       --  Exceptions are handled by the back end. The front end simply
       --  generates the handlers as they appear in the source, and AT END
       --  handlers are left untouched (they are not converted into exception
@@ -589,16 +583,13 @@ package Opt is
 
    --  WARNING: There is a matching C declaration of this type in fe.h
 
-   Exception_Mechanism : Exception_Mechanism_Type := Front_End_SJLJ;
+   Exception_Mechanism : Exception_Mechanism_Type := Back_End_SJLJ;
    --  GNAT
    --  Set to the appropriate value depending on the flags in system.ads
-   --  (Frontend_Exceptions + ZCX_By_Default). The C convention is there to
-   --  allow access by gigi.
+   --  (ZCX_By_Default). The C convention is there to allow access by gigi.
 
    --  WARNING: There is a matching C declaration of this variable in fe.h
 
-   function Back_End_Exceptions return Boolean;
-   function Front_End_Exceptions return Boolean;
    function ZCX_Exceptions return Boolean;
    function SJLJ_Exceptions return Boolean;
    --  GNAT
index cbf9944b679ca07b9e1be2b39e2bdfba3bc2e747..fe436c0f22767fae6dd1b73a080683d3fa789f3e 100644 (file)
@@ -48,7 +48,6 @@ package body Targparm is
       D32,  --   Duration_32_Bits
       DEN,  --   Denorm
       EXS,  --   Exit_Status_Supported
-      FEX,  --   Frontend_Exceptions
       MOV,  --   Machine_Overflows
       MRN,  --   Machine_Rounds
       PAS,  --   Preallocated_Stacks
@@ -79,7 +78,6 @@ package body Targparm is
    D32_Str : aliased constant Source_Buffer := "Duration_32_Bits";
    DEN_Str : aliased constant Source_Buffer := "Denorm";
    EXS_Str : aliased constant Source_Buffer := "Exit_Status_Supported";
-   FEX_Str : aliased constant Source_Buffer := "Frontend_Exceptions";
    MOV_Str : aliased constant Source_Buffer := "Machine_Overflows";
    MRN_Str : aliased constant Source_Buffer := "Machine_Rounds";
    PAS_Str : aliased constant Source_Buffer := "Preallocated_Stacks";
@@ -110,7 +108,6 @@ package body Targparm is
       D32 => D32_Str'Access,
       DEN => DEN_Str'Access,
       EXS => EXS_Str'Access,
-      FEX => FEX_Str'Access,
       MOV => MOV_Str'Access,
       MRN => MRN_Str'Access,
       PAS => PAS_Str'Access,
@@ -800,7 +797,6 @@ package body Targparm is
                      when D32 => Duration_32_Bits_On_Target          := Result;
                      when DEN => Denorm_On_Target                    := Result;
                      when EXS => Exit_Status_Supported_On_Target     := Result;
-                     when FEX => Frontend_Exceptions_On_Target       := Result;
                      when MOV => Machine_Overflows_On_Target         := Result;
                      when MRN => Machine_Rounds_On_Target            := Result;
                      when PAS => Preallocated_Stacks_On_Target       := Result;
index 9353d922ac4e1e2f03df8af9e6ea84c52eaf3810..3d3290b53f1529f1baab3ce80930e5829fccddea 100644 (file)
@@ -263,9 +263,6 @@ package Targparm is
    ZCX_By_Default_On_Target : Boolean := False;
    --  Indicates if zero cost scheme for exceptions
 
-   Frontend_Exceptions_On_Target : Boolean := True;
-   --  Indicates if we're using a front-end scheme for exceptions
-
    ------------------------------------
    -- Run-Time Library Configuration --
    ------------------------------------