From b9e67f8b4b38059390c4ccc0f12285544618feec Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Sat, 22 Sep 2007 09:39:41 +0000 Subject: re PR tree-optimization/33146 (ICE in build_polynomial_chrec, at tree-chrec.h:136) 2007-09-22 Richard Guenther PR tree-optimization/33146 * fold-const.c (fold_binary): Use the original tree for negating. * tree.h (STRIP_SIGN_NOPS): Converting from or to pointer also changes "sign". * gcc.c-torture/compile/pr33146.c: New testcase. From-SVN: r128666 --- gcc/tree.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gcc/tree.h') diff --git a/gcc/tree.h b/gcc/tree.h index 11a74f3..d7ca0b2 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -1019,7 +1019,9 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int, && (TYPE_MODE (TREE_TYPE (EXP)) \ == TYPE_MODE (TREE_TYPE (TREE_OPERAND (EXP, 0)))) \ && (TYPE_UNSIGNED (TREE_TYPE (EXP)) \ - == TYPE_UNSIGNED (TREE_TYPE (TREE_OPERAND (EXP, 0))))) \ + == TYPE_UNSIGNED (TREE_TYPE (TREE_OPERAND (EXP, 0)))) \ + && (POINTER_TYPE_P (TREE_TYPE (EXP)) \ + == POINTER_TYPE_P (TREE_TYPE (TREE_OPERAND (EXP, 0))))) \ (EXP) = TREE_OPERAND (EXP, 0) /* Like STRIP_NOPS, but don't alter the TREE_TYPE either. */ -- cgit v1.1