diff options
author | Richard Henderson <rth@redhat.com> | 2004-09-12 14:36:50 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2004-09-12 14:36:50 -0700 |
commit | 373c0e7f04097a50d480846786894883adbf5e45 (patch) | |
tree | 051c6e5b7ae1bdd153f37194a1ba91a1342fe790 /gcc/fold-const.c | |
parent | 7fac672272cce6ed7e6e8ca9a54116d40f303dd7 (diff) | |
download | gcc-373c0e7f04097a50d480846786894883adbf5e45.zip gcc-373c0e7f04097a50d480846786894883adbf5e45.tar.gz gcc-373c0e7f04097a50d480846786894883adbf5e45.tar.bz2 |
re PR c++/16254 (ICE in lower_stmt, at gimple-low.c:205)
PR c++/16254
* fold-const.c (fold) <case CLEANUP_POINT_EXPR>: Remove.
* tree.c, tree.h (has_cleanups): Remove.
cp/
* semantics.c (maybe_cleanup_point_expr): Don't call fold.
* typeck.c (condition_conversion): Likewise.
From-SVN: r87407
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r-- | gcc/fold-const.c | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 31bf7fd..972f276d 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -8946,49 +8946,6 @@ fold (tree expr) TREE_OPERAND (arg0, 1))))); return t; - case CLEANUP_POINT_EXPR: - /* Pull arithmetic ops out of the CLEANUP_POINT_EXPR where - appropriate. */ - if (! has_cleanups (arg0)) - return TREE_OPERAND (t, 0); - - { - enum tree_code code0 = TREE_CODE (arg0); - int kind0 = TREE_CODE_CLASS (code0); - - if (kind0 == '1' || code0 == TRUTH_NOT_EXPR) - { - tree arg00 = TREE_OPERAND (arg0, 0); - return fold (build1 (code0, type, - fold (build1 (CLEANUP_POINT_EXPR, - TREE_TYPE (arg00), arg00)))); - } - - if (kind0 == '<' || kind0 == '2' - || code0 == TRUTH_ANDIF_EXPR || code0 == TRUTH_ORIF_EXPR - || code0 == TRUTH_AND_EXPR || code0 == TRUTH_OR_EXPR - || code0 == TRUTH_XOR_EXPR) - { - tree arg00 = TREE_OPERAND (arg0, 0); - tree arg01 = TREE_OPERAND (arg0, 1); - - if (TREE_CONSTANT (arg00) - || ((code0 == TRUTH_ANDIF_EXPR || code0 == TRUTH_ORIF_EXPR) - && ! has_cleanups (arg00))) - return fold (build2 (code0, type, arg00, - fold (build1 (CLEANUP_POINT_EXPR, - TREE_TYPE (arg01), arg01)))); - - if (TREE_CONSTANT (arg01)) - return fold (build2 (code0, type, - fold (build1 (CLEANUP_POINT_EXPR, - TREE_TYPE (arg00), arg00)), - arg01)); - } - - return t; - } - case CALL_EXPR: /* Check for a built-in function. */ if (TREE_CODE (TREE_OPERAND (t, 0)) == ADDR_EXPR |