From: Marek Polacek Date: Mon, 15 Dec 2014 12:15:14 +0000 (+0000) Subject: re PR middle-end/64292 (FAIL: g++.dg/torture/pr60474.C -O1 (internal compiler... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f52e1d24fd49da929f731b0477106aadb3120fc4;p=gcc.git re PR middle-end/64292 (FAIL: g++.dg/torture/pr60474.C -O1 (internal compiler error)) PR middle-end/64292 * fold-const.c (negate_expr_p): Add INTEGRAL_TYPE_P check. From-SVN: r218745 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ced0bb9fe6f..60811d5ae0d 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 d71fa94d646..07da71ae196 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. */