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 middle-end/50066] [4.7 Regression] Bad signed int to unsigned long long conversion


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50066

--- Comment #9 from H.J. Lu <hjl.tools at gmail dot com> 2011-08-13 16:33:19 UTC ---
Shouldn't we check TREE_OVERFLOW:

diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c
index df7a9a2..4ec7e5b 100644
--- a/gcc/tree-vrp.c
+++ b/gcc/tree-vrp.c
@@ -7263,6 +7263,8 @@ simplify_conversion_using_ranges (gimple stmt)
   /* Get the value-range of the inner operand.  */
   innervr = get_value_range (innerop);
   if (innervr->type != VR_RANGE
+      || TREE_OVERFLOW (innervr->min)
+      || TREE_OVERFLOW (innervr->max)
       || TREE_CODE (innervr->min) != INTEGER_CST
       || TREE_CODE (innervr->max) != INTEGER_CST)
     return false;


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