This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix type mismatch in building ADDR_EXPR
- From: Richard Guenther <rguenth at tat dot physik dot uni-tuebingen dot de>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- Date: Wed, 18 May 2005 13:05:00 +0200 (CEST)
- Subject: [PATCH] Fix type mismatch in building ADDR_EXPR
Number one. Looks obvious, will apply at the end of the week
if nobody objects and bootstrap & regtest succeeds.
Richard.
2005-05-18 Richard Guenther <rguenth@gcc.gnu.org>
* tree-ssa-loop-ivopts.c (determine_base_object): Use
build_fold_addr_expr instead of creating invalid trees.
Index: tree-ssa-loop-ivopts.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-ssa-loop-ivopts.c,v
retrieving revision 2.69
diff -c -3 -p -r2.69 tree-ssa-loop-ivopts.c
*** tree-ssa-loop-ivopts.c 4 May 2005 13:57:40 -0000 2.69
--- tree-ssa-loop-ivopts.c 18 May 2005 11:03:12 -0000
*************** determine_base_object (tree expr)
*** 791,797 ****
if (TREE_CODE (base) == INDIRECT_REF)
return determine_base_object (TREE_OPERAND (base, 0));
! return fold (build1 (ADDR_EXPR, ptr_type_node, base));
case PLUS_EXPR:
case MINUS_EXPR:
--- 791,797 ----
if (TREE_CODE (base) == INDIRECT_REF)
return determine_base_object (TREE_OPERAND (base, 0));
! return build_fold_addr_expr (base);
case PLUS_EXPR:
case MINUS_EXPR: