PR sanitize/65000 45/100545/2 accepted/tizen/base/20161202.013225 submit/tizen_base/20161130.113807
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 28 Nov 2016 10:47:47 +0000 (13:47 +0300)
committerDongkyun Son <dongkyun.s@samsung.com>
Wed, 30 Nov 2016 11:14:04 +0000 (03:14 -0800)
 * tree-eh.c (mark_reachable_handlers): Mark source and destination
 regions of __builtin_eh_copy_values.

Imported from upstream:
git: 9eb0aee3084022e939d2f32f8c2c26609b139704
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@220626 138bc75d-0d04-0410-961f-82ee72b054a4

Signed-off-by: Slava Barinov <v.barinov@samsung.com>
Change-Id: I41209d06c5a245f42ff82c016dce37d2ffcc6f2a

gcc/tree-eh.c

index 28d6e49..3e4a278 100644 (file)
@@ -3874,6 +3874,17 @@ mark_reachable_handlers (sbitmap *r_reachablep, sbitmap *lp_reachablep)
            case GIMPLE_EH_DISPATCH:
              bitmap_set_bit (r_reachable, gimple_eh_dispatch_region (stmt));
              break;
+           case GIMPLE_CALL:
+             if (gimple_call_builtin_p (stmt, BUILT_IN_EH_COPY_VALUES))
+               for (int i = 0; i < 2; ++i)
+                 {
+                   tree rt = gimple_call_arg (stmt, i);
+                   HOST_WIDE_INT ri = tree_to_shwi (rt);
+
+                   gcc_assert (ri = (int)ri);
+                   bitmap_set_bit (r_reachable, ri);
+                 }
+             break;
            default:
              break;
            }