From fc7e0e7755af48f15f3eae8cfb8782ed07274e91 Mon Sep 17 00:00:00 2001 From: Aldy Hernandez Date: Wed, 21 Jul 2021 17:14:43 +0200 Subject: [PATCH] Allow non-null adjustments for pointers even when there is a known range. I have run into yet another case where there is a known range for a pointer, but it does not exclude non-null, so no adjustments are performed. gcc/ChangeLog: * gimple-range-cache.cc (non_null_ref::adjust_range): Do not check for varying. --- gcc/gimple-range-cache.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/gcc/gimple-range-cache.cc b/gcc/gimple-range-cache.cc index 23597ade802..95500ed6dc1 100644 --- a/gcc/gimple-range-cache.cc +++ b/gcc/gimple-range-cache.cc @@ -93,7 +93,6 @@ non_null_ref::adjust_range (irange &r, tree name, basic_block bb, // exceptions mean we could throw in the middle of the block, so just // punt for now on those. if (!cfun->can_throw_non_call_exceptions - && r.varying_p () && non_null_deref_p (name, bb, search_dom)) { int_range<2> nz; -- 2.31.1