diff options
author | Paolo Bonzini <bonzini@gnu.org> | 2009-01-28 08:02:31 +0000 |
---|---|---|
committer | Paolo Bonzini <bonzini@gcc.gnu.org> | 2009-01-28 08:02:31 +0000 |
commit | 89ebafc6cdbfe4f67d017844f50b3810fd9e1399 (patch) | |
tree | 3cd192be101ee3c3c1d45220682f7ba74918cf0b /gcc/tree-ssa-structalias.c | |
parent | bef3c57babac2e7ff368cb226a962644575c22e0 (diff) | |
download | gcc-89ebafc6cdbfe4f67d017844f50b3810fd9e1399.zip gcc-89ebafc6cdbfe4f67d017844f50b3810fd9e1399.tar.gz gcc-89ebafc6cdbfe4f67d017844f50b3810fd9e1399.tar.bz2 |
re PR tree-optimization/38984 (NULL pointers always considered distinct by PTA, even with -fno-delete-null-pointer-checks)
gcc:
2009-01-28 Paolo Bonzini <bonzini@gnu.org>
PR tree-optimization/38984
* tree-ssa-structalias.c (get_constraints_for_1): Do not use
the nothing_id variable if -fno-delete-null-pointer-checks.
gcc/testsuite:
2009-01-28 Paolo Bonzini <bonzini@gnu.org>
PR tree-optimization/38984
* gcc.dg/pr38984.c: New XFAILed testcase.
From-SVN: r143721
Diffstat (limited to 'gcc/tree-ssa-structalias.c')
-rw-r--r-- | gcc/tree-ssa-structalias.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c index cae478a..21566bb 100644 --- a/gcc/tree-ssa-structalias.c +++ b/gcc/tree-ssa-structalias.c @@ -3044,8 +3044,14 @@ get_constraint_for_1 (tree t, VEC (ce_s, heap) **results, bool address_p) happens below, since it will fall into the default case. The only case we know something about an integer treated like a pointer is when it is the NULL pointer, and then we just say it points to - NULL. */ - if (TREE_CODE (t) == INTEGER_CST + NULL. + + Do not do that if -fno-delete-null-pointer-checks though, because + in that case *NULL does not fail, so it _should_ alias *anything. + It is not worth adding a new option or renaming the existing one, + since this case is relatively obscure. */ + if (flag_delete_null_pointer_checks + && TREE_CODE (t) == INTEGER_CST && integer_zerop (t)) { temp.var = nothing_id; |