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
This commit is contained in:
Marek Polacek 2014-12-15 12:15:14 +00:00 committed by Marek Polacek
parent 4b4f2e35d0
commit f52e1d24fd
2 changed files with 6 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2014-12-15 Marek Polacek <polacek@redhat.com>
PR middle-end/64292
* fold-const.c (negate_expr_p): Add INTEGRAL_TYPE_P check.
2014-12-15 Renlin Li <renlin.li@arm.com>
* config/aarch64/aarch64.h (CLZ_DEFINED_VALUE_AT_ZERO): Return 2.

View file

@ -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. */