Patchwork [Ada] Fix nit in raise-gcc.c

login
register
mail settings
Submitter Arnaud Charlet
Date July 17, 2012, 10:15 a.m.
Message ID <20120717101528.GA26342@adacore.com>
Download mbox | patch
Permalink /patch/171390/
State New
Headers show

Comments

Arnaud Charlet - July 17, 2012, 10:15 a.m.
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.

Patch

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;
                     }