This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RFC on tree-ssa-dom.c bug
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: gcc-patches at gcc dot gnu dot org
- Date: Sun, 25 Jul 04 10:57:29 EDT
- Subject: RFC on tree-ssa-dom.c bug
The ACATS test cc1221d gets an ICE because the caller of
extract_range_from_cond expects it to return integer constants, but if
(e.g.) TYPE_MAX_VALUE isn't a constant, it won't do it.
Does this look like the correct fix?
Tested on x86_64-linux-gnu.
2004-07-25 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* tree-ssa-com.c (extract_range_from_cond): Return false if range
wouldn't be integers.
*** tree-ssa-dom.c 22 Jul 2004 16:39:48 -0000 2.26
--- tree-ssa-dom.c 25 Jul 2004 13:28:08 -0000
*************** extract_range_from_cond (tree cond, tree
*** 3370,3374 ****
cast into an integer type and used that way. */
if (TREE_CODE (TREE_TYPE (op1)) != INTEGER_TYPE)
! return 0;
type = TREE_TYPE (op1);
--- 3370,3374 ----
cast into an integer type and used that way. */
if (TREE_CODE (TREE_TYPE (op1)) != INTEGER_TYPE)
! return false;
type = TREE_TYPE (op1);
*************** extract_range_from_cond (tree cond, tree
*** 3411,3415 ****
default:
! return 0;
}
--- 3411,3415 ----
default:
! return false;
}
*************** extract_range_from_cond (tree cond, tree
*** 3417,3421 ****
*lo_p = low;
*inverted_p = inverted;
! return 1;
}
--- 3417,3422 ----
*lo_p = low;
*inverted_p = inverted;
!
! return (TREE_CODE (high) == INTEGER_CST && TREE_CODE (low) == INTEGER_CST);
}