From: mpolacek Date: Mon, 15 Dec 2014 12:15:14 +0000 (+0000) Subject: PR middle-end/64292 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=88b711237a655f62518388aa6b6c2f429dc9aa7e;p=thirdparty%2Fgcc.git PR middle-end/64292 * fold-const.c (negate_expr_p): Add INTEGRAL_TYPE_P check. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@218745 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ced0bb9fe6fd..60811d5ae0df 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2014-12-15 Marek Polacek + + PR middle-end/64292 + * fold-const.c (negate_expr_p): Add INTEGRAL_TYPE_P check. + 2014-12-15 Renlin Li * config/aarch64/aarch64.h (CLZ_DEFINED_VALUE_AT_ZERO): Return 2. diff --git a/gcc/fold-const.c b/gcc/fold-const.c index d71fa94d646b..07da71ae1968 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -400,7 +400,7 @@ negate_expr_p (tree t) switch (TREE_CODE (t)) { case INTEGER_CST: - if (TYPE_OVERFLOW_WRAPS (type)) + if (INTEGRAL_TYPE_P (type) && TYPE_OVERFLOW_WRAPS (type)) return true; /* Check that -CST will not overflow type. */