re PR tree-optimization/17016 (ICE with struct passed as reference)
authorZdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
Tue, 24 Aug 2004 20:50:42 +0000 (22:50 +0200)
committerZdenek Dvorak <rakdver@gcc.gnu.org>
Tue, 24 Aug 2004 20:50:42 +0000 (20:50 +0000)
PR tree-optimization/17016
* tree-ssa-loop-niter.c (number_of_iterations_cond,
number_of_iterations_exit): Use POINTER_TYPE_P instead
of testing for POINTER_TYPE.

From-SVN: r86517

gcc/ChangeLog
gcc/tree-ssa-loop-niter.c

index 01406c6c9402c62e66be625edc21b73c1eda712b..a9770c0bf153bb8185f76bf4ff76ca23f809e1cc 100644 (file)
@@ -1,3 +1,10 @@
+2004-08-24  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
+
+       PR tree-optimization/17016
+       * tree-ssa-loop-niter.c (number_of_iterations_cond,
+       number_of_iterations_exit): Use POINTER_TYPE_P instead
+       of testing for POINTER_TYPE.
+
 2004-08-24  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
 
        * tree-ssa-loop-ivcanon.c: New file.
index af1fbad1090ecd19f3ed0f89ee78641e0977109b..caba8b53b98da46c444b4a88ec3b5f66b7cb07da 100644 (file)
@@ -171,7 +171,7 @@ number_of_iterations_cond (tree type, tree base0, tree step0,
        return;
     }
 
-  if (TREE_CODE (type) == POINTER_TYPE)
+  if (POINTER_TYPE_P (type))
     {
       /* We assume pointer arithmetic never overflows.  */
       mmin = mmax = NULL_TREE;
@@ -653,7 +653,7 @@ number_of_iterations_exit (struct loop *loop, edge exit,
   type = TREE_TYPE (op0);
 
   if (TREE_CODE (type) != INTEGER_TYPE
-    && TREE_CODE (type) != POINTER_TYPE)
+      && !POINTER_TYPE_P (type))
     return false;
      
   if (!simple_iv (loop, stmt, op0, &base0, &step0))