diff options
author | Jeff Law <law@redhat.com> | 2019-06-21 10:36:00 -0600 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 2019-06-21 10:36:00 -0600 |
commit | 84338a14985c5f7b064a181180d221be16019978 (patch) | |
tree | 088907659d2a6de6d4f20dd87360f8ec8a2399af /gcc/tree-ssanames.c | |
parent | 1296eaf6ed32a3474f39b34dc0af6583a2d80096 (diff) |
re PR tree-optimization/90949 (null pointer check removed)
PR tree-optimization/90949
* tree-ssa-copy.c (fini_copy_prop): Use reset_flow_sensitive_info.
* tree-ssanames.c (reset_flow_sensitive_info): Reset non-null state.
* gcc.c-torture/execute/pr90949.c: New test.
From-SVN: r272555
Diffstat (limited to 'gcc/tree-ssanames.c')
-rw-r--r-- | gcc/tree-ssanames.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/tree-ssanames.c b/gcc/tree-ssanames.c index 5bac799e9a3..8b80bce8945 100644 --- a/gcc/tree-ssanames.c +++ b/gcc/tree-ssanames.c @@ -820,7 +820,12 @@ reset_flow_sensitive_info (tree name) { /* points-to info is not flow-sensitive. */ if (SSA_NAME_PTR_INFO (name)) - mark_ptr_info_alignment_unknown (SSA_NAME_PTR_INFO (name)); + { + /* [E]VRP can derive context sensitive alignment info and + non-nullness properties. We must reset both. */ + mark_ptr_info_alignment_unknown (SSA_NAME_PTR_INFO (name)); + SSA_NAME_PTR_INFO (name)->pt.null = 1; + } } else SSA_NAME_RANGE_INFO (name) = NULL; |