This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Question on tree-ssa-loop-im.c:for_each_index
- From: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- To: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>
- Cc: gcc at gcc dot gnu dot org
- Date: Sat, 19 Mar 2005 21:59:32 +0100
- Subject: Re: Question on tree-ssa-loop-im.c:for_each_index
- References: <10503190023.AA16775@vlsi1.ultra.nyu.edu>
Hello,
> VIEW_CONVERT_EXPR is tcc_reference, but we can have a statement like:
>
> x = <VIEW_CONVERT_EXPR some_type> 22;
what is the semantics of this expression? Should not this rather be
x = <NOP_EXPR some_type> 22
(or just INTEGER_CST:some_type 22)?
Zdenek
> What ends up happening here is that find_interesting_uses_stmt calls
> find_interesting_uses_address, which goes down the references and
> runs into the constant, which it doesn't know how to handle. I think
> the simplest fix is below. It's certainly safe in that it converts
> an ICE into not aborting and seems to do the right thing. The test case
> is in Ada and proprietary and it didn't seem worthwhile to make a small
> one for something this simple.
>
> Does the following look correct?
>
> *** tree-ssa-loop-im.c 11 Mar 2005 09:05:10 -0000 2.31
> --- tree-ssa-loop-im.c 19 Mar 2005 00:12:02 -0000
> *************** for_each_index (tree *addr_p, bool (*cbc
> *** 195,198 ****
> --- 195,199 ----
> case STRING_CST:
> case RESULT_DECL:
> + case INTEGER_CST:
> return true;
>