From f52e1d24fd49da929f731b0477106aadb3120fc4 Mon Sep 17 00:00:00 2001 From: Marek Polacek Date: Mon, 15 Dec 2014 12:15:14 +0000 Subject: [PATCH] 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 --- gcc/ChangeLog | 5 +++++ gcc/fold-const.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) 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. */ -- 2.30.2