aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-flow.h
diff options
context:
space:
mode:
authorDiego Novillo <dnovillo@redhat.com>2005-02-01 20:30:07 +0000
committerDiego Novillo <dnovillo@gcc.gnu.org>2005-02-01 15:30:07 -0500
commita1d13fa1672efeaf2886bb4184b6e73874c092ca (patch)
tree87292513a1b836b5850299e91904214e71fb9556 /gcc/tree-flow.h
parent28a3618fb707d32cf24e2d63ed6812cbf4054d14 (diff)
downloadgcc-a1d13fa1672efeaf2886bb4184b6e73874c092ca.zip
gcc-a1d13fa1672efeaf2886bb4184b6e73874c092ca.tar.gz
gcc-a1d13fa1672efeaf2886bb4184b6e73874c092ca.tar.bz2
re PR tree-optimization/19633 (local address incorrectly thought to escape)
PR tree-optimization/19633 * tree-flow.h (struct ptr_info_def): Add field 'pt_null'. * tree-ssa-alias.c (init_alias_info): Initialize. (merge_pointed_to_info): Set. (add_pointed_to_expr): Set pt_null if EXPR is a NULL pointer. (dump_points_to_info_for): Show value of pt_null. (struct count_ptr_d): Declare. (find_ptr_dereference): Remove. (ptr_is_dereferenced_by): Remove. (count_ptr_derefs): New local function. (count_uses_and_derefs): New local function. (compute_points_to_and_addr_escape): Call it. If the number of dereferences is greater than zero, mark the pointer as dereferenced. If there are fewer dereferences than uses of the pointer, the pointer's value escapes. testsuite/ChangeLog PR tree-optimization/19633 * testsuite/gcc.dg/pr19633-1.c: New test. * testsuite/gcc.dg/pr19633.c: Tweak to make pointer point to NULL or a symbol. From-SVN: r94558
Diffstat (limited to 'gcc/tree-flow.h')
-rw-r--r--gcc/tree-flow.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/tree-flow.h b/gcc/tree-flow.h
index 55ff2e7..d8d64fb 100644
--- a/gcc/tree-flow.h
+++ b/gcc/tree-flow.h
@@ -66,6 +66,9 @@ struct ptr_info_def GTY(())
/* Nonzero if this pointer points to a global variable. */
unsigned int pt_global_mem : 1;
+ /* Nonzero if this pointer points to NULL. */
+ unsigned int pt_null : 1;
+
/* Set of variables that this pointer may point to. */
bitmap pt_vars;