re PR tree-optimization/92131 (incorrect assumption that (ao >= 0) is always false)
authorAldy Hernandez <aldyh@redhat.com>
Thu, 17 Oct 2019 12:38:38 +0000 (12:38 +0000)
committerAldy Hernandez <aldyh@gcc.gnu.org>
Thu, 17 Oct 2019 12:38:38 +0000 (12:38 +0000)
PR tree-optimization/92131
* tree-vrp.c (value_range_base::dump): Display +INF for both
pointers and integers when appropriate.

From-SVN: r277107

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/evrp4.c
gcc/tree-vrp.c

index 9c0e754360e1b890f09e36477e3ded745f8f2269..3126adc95f40231c1648b069992e32735423ffba 100644 (file)
@@ -1,3 +1,9 @@
+2019-10-17  Aldy Hernandez  <aldyh@redhat.com>
+
+       PR tree-optimization/92131
+       * tree-vrp.c (value_range_base::dump): Display +INF for both
+       pointers and integers when appropriate.
+
 2019-10-17  Andre Vieira  <andre.simoesdiasvieira@arm.com>
 
        * tree-vect-loop.c (vect_analyze_loop_2): Use same condition to decide
index 39496169bc5a03fab110ae8f3b60e9f2ca4fc3cc..abd9dd1c2dd1b5740180659f86acf8cec3aa99ae 100644 (file)
@@ -1,3 +1,7 @@
+2019-10-17  Aldy Hernandez  <aldyh@redhat.com>
+
+       * gcc.dg/tree-ssa/evrp4.c: Check for +INF instead of -1.
+
 2019-10-17  Christophe Lyon  <christophe.lyon@linaro.org>
 
        * gcc.target/arm/vseleqdf.c: Add missing closing bracket.
index ba2f6b9b430ada4c442d48375f8c955df0d15c47..6710e6b5eff869f0b4fa93b450b9a406d5f2cce9 100644 (file)
@@ -17,4 +17,4 @@ int bar (struct st *s)
   foo (&s->a);
 }
 
-/* { dg-final { scan-tree-dump "\\\[1B, -1B\\\]" "evrp" } } */
+/* { dg-final { scan-tree-dump "\\\[1B, \\+INF\\\]" "evrp" } } */
index 21910b36518000469529076c8a57ae2a9a00d805..8d4f16e9e1f0a61e3ce39085132c68d1d67758a8 100644 (file)
@@ -428,8 +428,8 @@ value_range_base::dump (FILE *file) const
 
       fprintf (file, ", ");
 
-      if (INTEGRAL_TYPE_P (ttype)
-         && vrp_val_is_max (max ())
+      if (supports_type_p (ttype)
+         && vrp_val_is_max (max (), true)
          && TYPE_PRECISION (ttype) != 1)
        fprintf (file, "+INF");
       else