aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans.c
diff options
context:
space:
mode:
authorDiego Novillo <dnovillo@redhat.com>2006-01-13 14:20:01 +0000
committerDiego Novillo <dnovillo@gcc.gnu.org>2006-01-13 09:20:01 -0500
commit690c6eacb13e30f624963ce2abbbbeae0f25dcb3 (patch)
tree6c2e2875dfe56cf840aebf59c7f0cc1d9775676d /gcc/fortran/trans.c
parent403e54f013d0186db61adbc5cfee6ed08f35bfe6 (diff)
downloadgcc-690c6eacb13e30f624963ce2abbbbeae0f25dcb3.zip
gcc-690c6eacb13e30f624963ce2abbbbeae0f25dcb3.tar.gz
gcc-690c6eacb13e30f624963ce2abbbbeae0f25dcb3.tar.bz2
trans.c (gfc_add_expr_to_block): Do not fold tcc_statement nodes.
* trans.c (gfc_add_expr_to_block): Do not fold tcc_statement nodes. From-SVN: r109665
Diffstat (limited to 'gcc/fortran/trans.c')
-rw-r--r--gcc/fortran/trans.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/fortran/trans.c b/gcc/fortran/trans.c
index 5c74883..f1c0e02 100644
--- a/gcc/fortran/trans.c
+++ b/gcc/fortran/trans.c
@@ -361,7 +361,8 @@ gfc_add_expr_to_block (stmtblock_t * block, tree expr)
if (expr == NULL_TREE || IS_EMPTY_STMT (expr))
return;
- if (TREE_CODE (expr) != STATEMENT_LIST)
+ if (TREE_CODE (expr) != STATEMENT_LIST
+ && TREE_CODE_CLASS (TREE_CODE (expr)) != tcc_statement)
expr = fold (expr);
if (block->head)