diff options
author | Arnaud Charlet <charlet@adacore.com> | 2022-02-06 16:06:36 +0000 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2022-05-12 12:38:39 +0000 |
commit | ce19ac123abde3d9c52d52e13a00bbbe60e08722 (patch) | |
tree | d99855570690c3ea71ec71db7ea07a93672f2c1d /gcc/ada/gcc-interface/decl.cc | |
parent | 3b4ae9b98b07764b074110ba7215428df9efe320 (diff) | |
download | gcc-ce19ac123abde3d9c52d52e13a00bbbe60e08722.zip gcc-ce19ac123abde3d9c52d52e13a00bbbe60e08722.tar.gz gcc-ce19ac123abde3d9c52d52e13a00bbbe60e08722.tar.bz2 |
[Ada] Remove front-end SJLJ processing
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.
Diffstat (limited to 'gcc/ada/gcc-interface/decl.cc')
-rw-r--r-- | gcc/ada/gcc-interface/decl.cc | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/gcc/ada/gcc-interface/decl.cc b/gcc/ada/gcc-interface/decl.cc index d52c4fb..56ad499 100644 --- a/gcc/ada/gcc-interface/decl.cc +++ b/gcc/ada/gcc-interface/decl.cc @@ -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; |