* tree-vrp.c (infer_value_range): Only count pointer uses
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 8 Mar 2006 22:07:37 +0000 (22:07 +0000)
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 8 Mar 2006 22:07:37 +0000 (22:07 +0000)
commit581f18857bd28bf20e979e0b24f0c9cfade61003
treefe11681f27645614115303f8349df8e8836f7a42
parent33e6be9f514a2fa4c58182eb9ac0e69f37416c11
* tree-vrp.c (infer_value_range): Only count pointer uses
and dereferences if -fdelete-null-pointer-checks is enabled.

* tree-vrp.c (find_assert_locations): Infer value ranges for
single use pointers, but do not create ASSERT_EXPRs for them.
When a non-null range is inferred for a pointer, backwards
propagate that range to other equivalent pointers through the
use-def chain.

* gcc.dg/tree-ssa/20030730-1.c: No longer expected to fail.
* gcc.dg/tree-ssa/20030730-2.c: No longer expected to fail.
* g++.dg/tree-ssa/pr26406.C: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@111848 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/tree-ssa/pr26406.C [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/20030730-1.c
gcc/testsuite/gcc.dg/tree-ssa/20030730-2.c
gcc/tree-vrp.c