[Ada] Fix nit in raise-gcc.c

Arnaud Charlet charlet@adacore.com
Tue Jul 17 10:15:00 GMT 2012


In some cases, a cleanup action was missed.
No reduced testcase found.

Tested on x86_64-pc-linux-gnu, committed on trunk

2012-07-17  Tristan Gingold  <gingold@adacore.com>

	* raise-gcc.c (get_call_site_action_for): Remove useless init
	expression for p.
	(get_action_description_for): Do not overwrite action->kind.

-------------- next part --------------
Index: raise-gcc.c
===================================================================
--- raise-gcc.c	(revision 189565)
+++ raise-gcc.c	(working copy)
@@ -710,7 +710,7 @@
   else
     {
       _uleb128_t cs_lp, cs_action;
-      const unsigned char *p = region->call_site_table;
+      const unsigned char *p;
 
       /* Let the caller know there may be an action to take, but let it
 	 determine the kind.  */
@@ -947,13 +947,16 @@
                  passed (to follow the ABI).  */
               if (!(uw_phase & _UA_FORCE_UNWIND))
                 {
+		  enum action_kind act;
+
                   /* See if the filter we have is for an exception which
                      matches the one we are propagating.  */
                   _Unwind_Ptr choice = get_ttype_entry_for (region, ar_filter);
 
-		  action->kind = is_handled_by (choice, gnat_exception);
-                  if (action->kind != nothing)
+		  act = is_handled_by (choice, gnat_exception);
+                  if (act != nothing)
                     {
+		      action->kind = act;
                       action->ttype_filter = ar_filter;
                       return;
                     }


More information about the Gcc-patches mailing list