diff options
author | Jakub Jelinek <jakub@redhat.com> | 2014-12-06 00:00:09 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2014-12-06 00:00:09 +0100 |
commit | 06dd2aceb1855a33008066e285db77e28bbffa16 (patch) | |
tree | a6aec67162141abb0a0ec3158b81ddd7c15b82fe /gcc/sanopt.c | |
parent | 40da08e0dd91017678b20cb1db2cb529f64d33df (diff) | |
download | gcc-06dd2aceb1855a33008066e285db77e28bbffa16.zip gcc-06dd2aceb1855a33008066e285db77e28bbffa16.tar.gz gcc-06dd2aceb1855a33008066e285db77e28bbffa16.tar.bz2 |
re PR sanitizer/64170 (ICE compiling Linux Kernel drivers/media/rc/imon.c in imon_incoming_packet)
PR sanitizer/64170
* sanopt.c (maybe_optimize_asan_check_ifn): If base_checks is
non-NULL, call maybe_get_dominating_check on it even if g is
non-NULL.
* gcc.dg/asan/pr64170.c: New test.
From-SVN: r218440
Diffstat (limited to 'gcc/sanopt.c')
-rw-r--r-- | gcc/sanopt.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/sanopt.c b/gcc/sanopt.c index e0d3a85..ce9fbcf 100644 --- a/gcc/sanopt.c +++ b/gcc/sanopt.c @@ -408,12 +408,13 @@ maybe_optimize_asan_check_ifn (struct sanopt_ctx *ctx, gimple stmt) } gimple g = maybe_get_dominating_check (*ptr_checks); + gimple g2 = NULL; - if (!g && base_checks) + if (base_checks) /* Try with base address as well. */ - g = maybe_get_dominating_check (*base_checks); + g2 = maybe_get_dominating_check (*base_checks); - if (!g) + if (g == NULL && g2 == NULL) { /* For this PTR we don't have any ASAN_CHECK stmts recorded, so there's nothing to optimize yet. */ |