This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix type mismatch in building ADDR_EXPR
- From: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- To: Richard Guenther <rguenth at tat dot physik dot uni-tuebingen dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 18 May 2005 13:24:02 +0200
- Subject: Re: [PATCH] Fix type mismatch in building ADDR_EXPR
- References: <Pine.LNX.4.44.0505181302050.5176-100000@alwazn.tat.physik.uni-tuebingen.de>
Hello,
> Number one. Looks obvious, will apply at the end of the week
> if nobody objects and bootstrap & regtest succeeds.
there is a small problem with the patch -- you need to convert the
result to ptr_type_node.
Zdenek
> 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: