[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 984e9ca..90fcfad 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 8d6dd90..7419c57 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 f773778..edab985 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 00b7745..1867469 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 4bdc023..dc3a1af 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 d52c4fb..56ad499 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 39059cb..5741986 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 0a11619..39fa9be 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 05571f2..59a9170 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 c016361..57756d4 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 be5d664..7390f3a 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 dc3d6c4..984d5a2 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 378fa9b..8d8e5f0 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 31a5351..1148a46 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 37726fe..90abfe9 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 3604280..fcc0c4f 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 4268ff5..0562bf7 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 a412645..a8848d6 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 b6f1550..56d708d 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 10fc281..6f2cb24 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 9a40009..d4b8364 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 85e9c9e..0ebc233 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 83ac5ea..2189465 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 5013883..d3bafb2 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 84cf532..0b8aad9 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 56f4d09..c656604 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 24803e2..ee1e87a 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 5cee747..c4fb6ed 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 db46b74..cc502da 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 87eb903..9336207 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 ebf8132..2a693c5 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 302a2f3..2f13aae 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 77fb6f0..a2eaf6a 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 827f9df..7e61ae3 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 06f7831..5959b72 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 2ba5198..c15a517 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 7872523..981e7ca 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 4273245..42d14c4 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 214e3d5..aa8515a 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 be391d0..ae09b78 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 9ee828b..4b091ae 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 d7ab0a9..a5d4d87 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 e304d50..4f96385 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 6cf9b3f..b8a0ba1 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 07da01d..ecfd7e6 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 b6807b3..72fb963 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 c8cbf52..4c912b8 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 d70642e..f8115a5 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 262445d..8894abb 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 a739441..0556cbf 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 840682b..8bf58b7 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 c82f8fc..1341b9d 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 be391d0..ae09b78 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 bb72157..c7b2c97 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 d4b4dce..a9dbf97 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 7f7f817..83e44cb 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 2b83609..e7dfc29 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 f232b34..146a87b 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 1c59deb..0e448d4 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 942c4b1..70c1e7c 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 42aeb34..bb42c6a 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 f84d8f0..f7be01d 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 26e35ab..05cadbc 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 9eb643c..aebbfd7 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 6cdd59e..ed9850f 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 47a91e6..3c98b4c 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 ae6b844..24f6cc9 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 c38a93f..0d8b25f 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 cbf9944..fe436c0 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 9353d92..3d3290b 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 --
    ------------------------------------