aboutsummaryrefslogtreecommitdiff
path: root/gcc/asan.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/asan.c')
-rw-r--r--gcc/asan.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/asan.c b/gcc/asan.c
index 05f8b63..00d0e67 100644
--- a/gcc/asan.c
+++ b/gcc/asan.c
@@ -62,6 +62,7 @@ along with GCC; see the file COPYING3. If not see
#include "builtins.h"
#include "fnmatch.h"
#include "tree-inline.h"
+#include "tree-ssa.h"
/* AddressSanitizer finds out-of-bounds and use-after-free bugs
with <2x slowdown on average.
@@ -2061,10 +2062,10 @@ static tree
maybe_create_ssa_name (location_t loc, tree base, gimple_stmt_iterator *iter,
bool before_p)
{
+ STRIP_USELESS_TYPE_CONVERSION (base);
if (TREE_CODE (base) == SSA_NAME)
return base;
- gimple *g = gimple_build_assign (make_ssa_name (TREE_TYPE (base)),
- TREE_CODE (base), base);
+ gimple *g = gimple_build_assign (make_ssa_name (TREE_TYPE (base)), base);
gimple_set_location (g, loc);
if (before_p)
gsi_insert_before (iter, g, GSI_SAME_STMT);