Commit f77107e8 by Eric Botcazou

* fold-const.c (const_binop): Add early return for non-tcc_binary.

From-SVN: r220007
parent 0c799056
2015-01-23 Chen Gang <gang.chen.5i5j@gmail.com> 2015-01-22 Eric Botcazou <ebotcazou@adacore.com>
* fold-const.c (const_binop): Add early return for non-tcc_binary.
2015-01-22 Chen Gang <gang.chen.5i5j@gmail.com>
* toplev.c (init_local_tick): Process the failure when read * toplev.c (init_local_tick): Process the failure when read
fails for random_seed. fails for random_seed.
......
...@@ -1562,9 +1562,13 @@ const_binop (enum tree_code code, tree type, tree arg1, tree arg2) ...@@ -1562,9 +1562,13 @@ const_binop (enum tree_code code, tree type, tree arg1, tree arg2)
default:; default:;
} }
if (TREE_CODE_CLASS (code) != tcc_binary)
return NULL_TREE;
/* Make sure type and arg0 have the same saturating flag. */ /* Make sure type and arg0 have the same saturating flag. */
gcc_checking_assert (TYPE_SATURATING (type) gcc_checking_assert (TYPE_SATURATING (type)
== TYPE_SATURATING (TREE_TYPE (arg1))); == TYPE_SATURATING (TREE_TYPE (arg1)));
return const_binop (code, arg1, arg2); return const_binop (code, arg1, arg2);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment