diff options
author | dnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-08-19 18:08:55 +0000 |
---|---|---|
committer | dnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-08-19 18:08:55 +0000 |
commit | 8df8d61f081139c519c2250e16f1880a5c0eb4a2 (patch) | |
tree | e021dbfc4fa5df69c8229745ea8e626e837dee2f /gcc/tree-cfgcleanup.c | |
parent | 449ec7dc7c89a5733d3a69a9b2180f5e8dfe02ee (diff) | |
download | gcc-8df8d61f081139c519c2250e16f1880a5c0eb4a2.tar.gz |
PR 23476
* tree-cfgcleanup.c (cleanup_control_expr_graph): Fold the
conditional expression before testing its value.
PR 23476
* gcc.c-torture/compile/pr23476.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@103290 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-cfgcleanup.c')
-rw-r--r-- | gcc/tree-cfgcleanup.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/tree-cfgcleanup.c b/gcc/tree-cfgcleanup.c index f8bca03e9df..0f8bfc5ec1b 100644 --- a/gcc/tree-cfgcleanup.c +++ b/gcc/tree-cfgcleanup.c @@ -81,11 +81,11 @@ cleanup_control_expr_graph (basic_block bb, block_stmt_iterator bsi) switch (TREE_CODE (expr)) { case COND_EXPR: - val = COND_EXPR_COND (expr); + val = fold (COND_EXPR_COND (expr)); break; case SWITCH_EXPR: - val = SWITCH_COND (expr); + val = fold (SWITCH_COND (expr)); if (TREE_CODE (val) != INTEGER_CST) return false; break; |