From eb1e3e628ed95cbe2d831e5595f712df9832d02a Mon Sep 17 00:00:00 2001 From: ebotcazou Date: Thu, 22 Jan 2015 16:44:50 +0000 Subject: * fold-const.c (const_binop): Add early return for non-tcc_binary. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@220007 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/fold-const.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gcc/fold-const.c') diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 50a987771ab..b4301c78f30 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -1562,9 +1562,13 @@ const_binop (enum tree_code code, tree type, tree arg1, tree arg2) default:; } + if (TREE_CODE_CLASS (code) != tcc_binary) + return NULL_TREE; + /* Make sure type and arg0 have the same saturating flag. */ gcc_checking_assert (TYPE_SATURATING (type) == TYPE_SATURATING (TREE_TYPE (arg1))); + return const_binop (code, arg1, arg2); } -- cgit v1.2.1