diff options
author | Richard Biener <rguenther@suse.de> | 2013-03-05 15:02:58 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2013-03-05 15:02:58 +0000 |
commit | 9ca966ca09a5a2d1fbb16bbb75f3c16fa8d98a0d (patch) | |
tree | 57153e917882d29b3a07fb2c6fe25541a963b12c /gcc/tree-ssa-sccvn.c | |
parent | d273b1767420781173a2d2b6ff9570b172756bf7 (diff) | |
download | gcc-9ca966ca09a5a2d1fbb16bbb75f3c16fa8d98a0d.zip gcc-9ca966ca09a5a2d1fbb16bbb75f3c16fa8d98a0d.tar.gz gcc-9ca966ca09a5a2d1fbb16bbb75f3c16fa8d98a0d.tar.bz2 |
re PR tree-optimization/56521 (Uninitialized value_id)
2013-03-05 Richard Biener <rguenther@suse.de>
PR tree-optimization/56521
* tree-ssa-sccvn.c (set_value_id_for_result): Always initialize
value-id.
From-SVN: r196465
Diffstat (limited to 'gcc/tree-ssa-sccvn.c')
-rw-r--r-- | gcc/tree-ssa-sccvn.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c index 202980c..c63aa2d 100644 --- a/gcc/tree-ssa-sccvn.c +++ b/gcc/tree-ssa-sccvn.c @@ -3954,18 +3954,17 @@ free_scc_vn (void) XDELETE (optimistic_info); } -/* Set *ID if we computed something useful in RESULT. */ +/* Set *ID according to RESULT. */ static void set_value_id_for_result (tree result, unsigned int *id) { - if (result) - { - if (TREE_CODE (result) == SSA_NAME) - *id = VN_INFO (result)->value_id; - else if (is_gimple_min_invariant (result)) - *id = get_or_alloc_constant_value_id (result); - } + if (result && TREE_CODE (result) == SSA_NAME) + *id = VN_INFO (result)->value_id; + else if (result && is_gimple_min_invariant (result)) + *id = get_or_alloc_constant_value_id (result); + else + *id = get_next_value_id (); } /* Set the value ids in the valid hash tables. */ |