Commit b3393f1f by Zdenek Dvorak Committed by Zdenek Dvorak

re PR tree-optimization/17016 (ICE with struct passed as reference)

	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
parent 82b85a85
2004-08-24 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz> 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. * tree-ssa-loop-ivcanon.c: New file.
* tree-ssa-loop-manip.c (create_iv): New function. * tree-ssa-loop-manip.c (create_iv): New function.
* Makefile.in (tree-ssa-loop-ivcanon.o): Add. * Makefile.in (tree-ssa-loop-ivcanon.o): Add.
......
...@@ -171,7 +171,7 @@ number_of_iterations_cond (tree type, tree base0, tree step0, ...@@ -171,7 +171,7 @@ number_of_iterations_cond (tree type, tree base0, tree step0,
return; return;
} }
if (TREE_CODE (type) == POINTER_TYPE) if (POINTER_TYPE_P (type))
{ {
/* We assume pointer arithmetic never overflows. */ /* We assume pointer arithmetic never overflows. */
mmin = mmax = NULL_TREE; mmin = mmax = NULL_TREE;
...@@ -653,7 +653,7 @@ number_of_iterations_exit (struct loop *loop, edge exit, ...@@ -653,7 +653,7 @@ number_of_iterations_exit (struct loop *loop, edge exit,
type = TREE_TYPE (op0); type = TREE_TYPE (op0);
if (TREE_CODE (type) != INTEGER_TYPE if (TREE_CODE (type) != INTEGER_TYPE
&& TREE_CODE (type) != POINTER_TYPE) && !POINTER_TYPE_P (type))
return false; return false;
if (!simple_iv (loop, stmt, op0, &base0, &step0)) if (!simple_iv (loop, stmt, op0, &base0, &step0))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment