From: Yury Gribov Date: Mon, 16 Jun 2014 18:31:22 +0000 (+0000) Subject: asan.c (build_check_stmt): Fix maybe-uninitialized warning. X-Git-Tag: releases/gcc-5.1.0~6840 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=241e298a555017bd712757e14ef3488024493374;p=thirdparty%2Fgcc.git asan.c (build_check_stmt): Fix maybe-uninitialized warning. 2014-06-16 Yury Gribov * asan.c (build_check_stmt): Fix maybe-uninitialized warning. From-SVN: r211713 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b74893a59ec9..bc36d0683e47 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2014-06-16 Yury Gribov + + * asan.c (build_check_stmt): Fix maybe-uninitialized warning. + 2014-06-16 Vladimir Makarov PR rtl-optimization/61522 diff --git a/gcc/asan.c b/gcc/asan.c index 19e15247766d..281a7956bbe6 100644 --- a/gcc/asan.c +++ b/gcc/asan.c @@ -1636,6 +1636,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 @@ -1735,7 +1742,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,