diff mbox

[5/17] Fix bootstrap error

Message ID 543F83E8.6040107@samsung.com
State New
Headers show

Commit Message

Yury Gribov Oct. 16, 2014, 8:38 a.m. UTC
Same as mainline.

Comments

Jakub Jelinek Oct. 16, 2014, 8:46 a.m. UTC | #1
On Thu, Oct 16, 2014 at 12:38:00PM +0400, Yury Gribov wrote:
> Same as mainline.

> 2014-10-15  Yury Gribov  <y.gribov@samsung.com>
> 
> 	Backport from mainline
> 	2014-06-16  Yury Gribov  <y.gribov@samsung.com>
> 
> 	* asan.c (build_check_stmt): Fix maybe-uninitialized warning.

Ok.

	Jakub
diff mbox

Patch

2014-10-15  Yury Gribov  <y.gribov@samsung.com>

	Backport from mainline
	2014-06-16  Yury Gribov  <y.gribov@samsung.com>

	* asan.c (build_check_stmt): Fix maybe-uninitialized warning.

diff --git a/gcc/asan.c b/gcc/asan.c
index 5c091d0..3729178 100644
--- a/gcc/asan.c
+++ b/gcc/asan.c
@@ -1635,6 +1635,13 @@  build_check_stmt (location_t location, tree base, tree len,
 
   gcc_assert (!(size_in_bytes > 0 && !non_zero_len_p));
 
+  if (start_instrumented && end_instrumented)
+    {
+      if (!before_p)
+        gsi_next (iter);
+      return;
+    }
+
   if (len)
     len = unshare_expr (len);
   else
@@ -1734,7 +1741,7 @@  build_check_stmt (location_t location, tree base, tree len,
   gsi_insert_after (&gsi, g, GSI_NEW_STMT);
   tree base_addr = gimple_assign_lhs (g);
 
-  tree t;
+  tree t = NULL_TREE;
   if (real_size_in_bytes >= 8)
     {
       tree shadow = build_shadow_mem_access (&gsi, location, base_addr,