summaryrefslogtreecommitdiffstats
path: root/gcc/asan.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2012-12-03 13:57:29 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2012-12-03 13:57:29 +0000
commit38e9269e095ed6be02775e4e2bc5ef4631b997bd (patch)
tree17bdc749405e3941bea8982fda4b070003f37bc3 /gcc/asan.c
parent376b14150dd61999c3a5fa87d34b75aa7a91886b (diff)
downloadppe42-gcc-38e9269e095ed6be02775e4e2bc5ef4631b997bd.tar.gz
ppe42-gcc-38e9269e095ed6be02775e4e2bc5ef4631b997bd.zip
* asan.c (instrument_assignment): Instrument lhs only
for gimple_store_p and rhs1 only for gimple_assign_load_p. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194087 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/asan.c')
-rw-r--r--gcc/asan.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/asan.c b/gcc/asan.c
index 26c4178a9f0..2563a305b20 100644
--- a/gcc/asan.c
+++ b/gcc/asan.c
@@ -1339,10 +1339,12 @@ instrument_assignment (gimple_stmt_iterator *iter)
gcc_assert (gimple_assign_single_p (s));
- instrument_derefs (iter, gimple_assign_lhs (s),
- gimple_location (s), true);
- instrument_derefs (iter, gimple_assign_rhs1 (s),
- gimple_location (s), false);
+ if (gimple_store_p (s))
+ instrument_derefs (iter, gimple_assign_lhs (s),
+ gimple_location (s), true);
+ if (gimple_assign_load_p (s))
+ instrument_derefs (iter, gimple_assign_rhs1 (s),
+ gimple_location (s), false);
}
/* Instrument the function call pointed to by the iterator ITER, if it
OpenPOWER on IntegriCloud