diff options
author | Richard Guenther <rguenther@suse.de> | 2008-07-19 20:02:29 +0000 |
---|---|---|
committer | Andreas Tobler <andreast@gcc.gnu.org> | 2008-07-19 22:02:29 +0200 |
commit | bb9e419935d5ef9fd90d27ed818b91fb6d49c68a (patch) | |
tree | 86848acd2172e064f4a209b5b054324423da0eea /gcc/tree-ssa-pre.c | |
parent | 52e07aa164ec9029ed9ddfb236917fe2efab0de0 (diff) | |
download | gcc-bb9e419935d5ef9fd90d27ed818b91fb6d49c68a.zip gcc-bb9e419935d5ef9fd90d27ed818b91fb6d49c68a.tar.gz gcc-bb9e419935d5ef9fd90d27ed818b91fb6d49c68a.tar.bz2 |
re PR bootstrap/36864 (Yet another bootstrap failure on i686-apple-darwin9)
2008-07-19 Richard Guenther <rguenther@suse.de>
PR bootstrap/36864
* tree-ssa-sccvn.h (get_constant_value_id): Declare.
* tree-ssa-sccvn.c (get_constant_value_id): New function.
* tree-ssa-pre.c (get_expr_value_id): For newly created
constant value-ids make sure to add the expression to its
expression-set.
From-SVN: r137991
Diffstat (limited to 'gcc/tree-ssa-pre.c')
-rw-r--r-- | gcc/tree-ssa-pre.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c index efa934f..ed337a3 100644 --- a/gcc/tree-ssa-pre.c +++ b/gcc/tree-ssa-pre.c @@ -599,7 +599,16 @@ get_expr_value_id (pre_expr expr) switch (expr->kind) { case CONSTANT: - return get_or_alloc_constant_value_id (PRE_EXPR_CONSTANT (expr)); + { + unsigned int id; + id = get_constant_value_id (PRE_EXPR_CONSTANT (expr)); + if (id == 0) + { + id = get_or_alloc_constant_value_id (PRE_EXPR_CONSTANT (expr)); + add_to_value (id, expr); + } + return id; + } case NAME: return VN_INFO (PRE_EXPR_NAME (expr))->value_id; case NARY: |