[Bug tree-optimization/30911] VRP fails to eliminate range checks in Ada code
rguenth at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri Feb 23 12:41:00 GMT 2007
------- Comment #19 from rguenth at gcc dot gnu dot org 2007-02-23 12:41 -------
Yeah, the fold-const.c chunk misses
+ /* We can compare x OP cst based on the value range of the type of
+ x. */
+ if (TREE_CODE (arg1) == INTEGER_CST
+ && TREE_CODE (arg0) != INTEGER_CST
+ && !POINTER_TYPE_P (TREE_TYPE (arg0))
^^^^ this line
+ && TYPE_MIN_VALUE (TREE_TYPE (arg0))
I don't think I'm folding pointer types, if arg1 is an integer constant
arg0 is of integer type as well.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30911
More information about the Gcc-bugs
mailing list