OSDN Git Service

./:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 9 Jun 2007 16:28:31 +0000 (16:28 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 9 Jun 2007 16:28:31 +0000 (16:28 +0000)
PR tree-optimization/32169
* tree-vrp.c (extract_range_from_unary_expr): For NOP_EXPR and
CONVERT_EXPR, check whether min and max both converted to an
overflow infinity representation.
testsuite/:
PR tree-optimization/32169
* gcc.c-torture/compile/pr32169.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@125591 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/pr32169.c [new file with mode: 0644]
gcc/tree-vrp.c

index 2154665..dbb2447 100644 (file)
@@ -1,3 +1,10 @@
+2007-06-09  Ian Lance Taylor  <iant@google.com>
+
+       PR tree-optimization/32169
+       * tree-vrp.c (extract_range_from_unary_expr): For NOP_EXPR and
+       CONVERT_EXPR, check whether min and max both converted to an
+       overflow infinity representation.
+
 2007-06-08  Eric Botcazou  <ebotcazou@adacore.com>
 
        * reload1.c (fixup_abnormal_edges): Clear bb field for insns
index 14f7baf..bc45908 100644 (file)
@@ -1,3 +1,8 @@
+2007-06-09  Ian Lance Taylor  <iant@google.com>
+
+       PR tree-optimization/32169
+       * gcc.c-torture/compile/pr32169.c: New test.
+
 2007-06-08  Harsha Jagasia <harsha.jagasia@amd.com>
 
        * gcc.dg/vect/costmodel: New directory.
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr32169.c b/gcc/testsuite/gcc.c-torture/compile/pr32169.c
new file mode 100644 (file)
index 0000000..29d3022
--- /dev/null
@@ -0,0 +1,17 @@
+void f(char);
+static inline
+void * __memset_generic(char c)
+{
+  f(c);
+}
+int prepare_startup_playback_urb(
+     int b,
+     int c
+)
+{
+  char d;
+  if (b)
+    __memset_generic(c == ( 1) ? 0x80 : 0);
+  else
+    __memset_generic (c == ( 1) ? 0x80 : 0);
+}
index 7506092..2a51de7 100644 (file)
@@ -2208,6 +2208,8 @@ extract_range_from_unary_expr (value_range_t *vr, tree expr)
              && is_gimple_val (new_max)
              && tree_int_cst_equal (new_min, orig_min)
              && tree_int_cst_equal (new_max, orig_max)
+             && (!is_overflow_infinity (new_min)
+                 || !is_overflow_infinity (new_max))
              && (cmp = compare_values (new_min, new_max)) <= 0
              && cmp >= -1)
            {