diff options
author | Richard Biener <rguenther@suse.de> | 2018-03-16 12:04:29 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2018-03-16 12:04:29 +0000 |
commit | a1295eec4e21ad46774b829e2b54b04d8f0e5e35 (patch) | |
tree | 91bc37a847e1eafb25cd952c4fcb0dcec48d91d9 /gcc | |
parent | 15f0c25f4e9194fd03b2788769b7e1163e5caabd (diff) | |
download | gcc-a1295eec4e21ad46774b829e2b54b04d8f0e5e35.zip gcc-a1295eec4e21ad46774b829e2b54b04d8f0e5e35.tar.gz gcc-a1295eec4e21ad46774b829e2b54b04d8f0e5e35.tar.bz2 |
re PR c/84873 (ICE: verify_ssa failed (error: definition in block 3 does not dominate use in block 4))
2018-03-16 Richard Biener <rguenther@suse.de>
PR c/84873
* c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
unshare the possibly folded expression.
From-SVN: r258591
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/c-family/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/c-family/c-gimplify.c | 12 |
2 files changed, 9 insertions, 9 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index a03ff86..a54d44e 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,9 @@ +2018-03-16 Richard Biener <rguenther@suse.de> + + PR c/84873 + * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead + unshare the possibly folded expression. + 2018-03-15 Richard Biener <rguenther@suse.de> PR c/84873 diff --git a/gcc/c-family/c-gimplify.c b/gcc/c-family/c-gimplify.c index e6b90ef..faaf22e 100644 --- a/gcc/c-family/c-gimplify.c +++ b/gcc/c-family/c-gimplify.c @@ -245,15 +245,9 @@ c_gimplify_expr (tree *expr_p, gimple_seq *pre_p ATTRIBUTE_UNUSED, unsigned_type_node) && !types_compatible_p (TYPE_MAIN_VARIANT (TREE_TYPE (*op1_p)), integer_type_node)) - { - /* ??? Do not use convert () here or fold arbitrary trees - since folding can introduce tree sharing which is not - allowed during gimplification. */ - if (TREE_CODE (*op1_p) == INTEGER_CST) - *op1_p = fold_convert (unsigned_type_node, *op1_p); - else - *op1_p = build1 (NOP_EXPR, unsigned_type_node, *op1_p); - } + /* Make sure to unshare the result, tree sharing is invalid + during gimplification. */ + *op1_p = unshare_expr (convert (unsigned_type_node, *op1_p)); break; } |