[gcc(refs/users/aoliva/heads/testme)] hardcfr: mark throw-expected functions [ada/gcc-interface]

Alexandre Oliva aoliva@gcc.gnu.org
Thu Oct 20 22:31:50 GMT 2022


https://gcc.gnu.org/g:67f303a7355589d12b80ae1dd86d4fe9f28b6b86

commit 67f303a7355589d12b80ae1dd86d4fe9f28b6b86
Author: Alexandre Oliva <oliva@adacore.com>
Date:   Wed Oct 19 20:36:20 2022 -0300

    hardcfr: mark throw-expected functions [ada/gcc-interface]
    
    Mark exception-(re)raising builtin declarations with ECF_THROW.
    
    
    for  gcc/ada/gcc-interface/ChangeLog
    
            * trans.cc (gigi): Mark __gnat_reraise_zcx with ECF_THROW.
            (build_raise_check): Likewise for all rcheck subprograms.

Diff:
---
 gcc/ada/gcc-interface/trans.cc | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gcc/ada/gcc-interface/trans.cc b/gcc/ada/gcc-interface/trans.cc
index d0ff741585e..5bfa6f362a2 100644
--- a/gcc/ada/gcc-interface/trans.cc
+++ b/gcc/ada/gcc-interface/trans.cc
@@ -513,6 +513,7 @@ gigi (Node_Id gnat_root,
 			   ftype, NULL_TREE,
 			   is_default, true, true, true, false, false, NULL,
 			   Empty);
+  set_call_expr_flags (reraise_zcx_decl, ECF_NORETURN | ECF_THROW);
 
   /* Dummy objects to materialize "others" and "all others" in the exception
      tables.  These are exported by a-exexpr-gcc.adb, so see this unit for
@@ -552,6 +553,7 @@ gigi (Node_Id gnat_root,
 	  (get_identifier ("__gnat_last_chance_handler"), NULL_TREE, ftype,
 	   NULL_TREE, is_default, true, true, true, false, false, NULL,
 	   Empty);
+      set_call_expr_flags (decl, ECF_NORETURN);
       for (i = 0; i < (int) ARRAY_SIZE (gnat_raise_decls); i++)
 	gnat_raise_decls[i] = decl;
     }
@@ -715,6 +717,7 @@ build_raise_check (int check, enum exception_info_kind kind)
     = create_subprog_decl (get_identifier (Name_Buffer), NULL_TREE, ftype,
 			   NULL_TREE, is_default, true, true, true, false,
 			   false, NULL, Empty);
+  set_call_expr_flags (result, ECF_NORETURN | ECF_THROW);
 
   return result;
 }


More information about the Gcc-cvs mailing list