re PR sanitizer/65000 (ICE in in expand_builtin_eh_common, at except.c:2072)
authorRichard Henderson <rth@redhat.com>
Wed, 11 Feb 2015 17:04:38 +0000 (09:04 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Wed, 11 Feb 2015 17:04:38 +0000 (09:04 -0800)
PR sanitize/65000

 * tree-eh.c (mark_reachable_handlers): Mark source and destination
 regions of __builtin_eh_copy_values.

From-SVN: r220626

gcc/ChangeLog
gcc/tree-eh.c

index 0f05ee4..87bf089 100644 (file)
@@ -1,3 +1,9 @@
+2015-02-11  Richard Henderson  <rth@redhat.com>
+
+       PR sanitize/65000
+       * tree-eh.c (mark_reachable_handlers): Mark source and destination
+       regions of __builtin_eh_copy_values.
+
 2015-02-11  Jakub Jelinek  <jakub@redhat.com>
 
        PR middle-end/65003
index 159fa2b..3c45f37 100644 (file)
@@ -3859,6 +3859,17 @@ mark_reachable_handlers (sbitmap *r_reachablep, sbitmap *lp_reachablep)
                              gimple_eh_dispatch_region (
                                 as_a <geh_dispatch *> (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;
            }