asan.c (instrument_assignment): Instrument lhs only for gimple_store_p and rhs1 only for gimple_assign_load_p.

* asan.c (instrument_assignment): Instrument lhs only
	for gimple_store_p and rhs1 only for gimple_assign_load_p.

From-SVN: r194087
This commit is contained in:
Jakub Jelinek 2012-12-03 14:57:29 +01:00 committed by Jakub Jelinek
parent 4a0639a2a9
commit 52f2e7e1e9
2 changed files with 11 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2012-12-03 Jakub Jelinek <jakub@redhat.com>
* asan.c (instrument_assignment): Instrument lhs only
for gimple_store_p and rhs1 only for gimple_assign_load_p.
2012-12-03 Michael Zolotukhin <michael.v.zolotukhin@intel.com>
* Makefile.in: Add target mddump, build/genmddump.o. Extend

View File

@ -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