This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/30911] VRP fails to eliminate range checks in Ada code



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]