This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch, scev] Fix PR tree-optimization/36630
Hi,
> > On Thu, Jul 17, 2008 at 4:25 AM, Ira Rosen <IRAR@il.ibm.com> wrote:
> > >
> > > Hi,
> > >
> > > The test in PR36630 ICEs, since evolution_part_in_loop_num returns NULL
> for
> > > the access function (short int) {(short unsigned int) i_44, +, 1}_1).
> > > Adding STRIP_NOPS before chrec's analysis solves the problem.
> >
> > How did the access function get a cast in front of it in the first place?
> >
> > My admittedly possibly out of date recollection is that casts can only
> > occur inside the chrec.
no, chrecs may appear anywhere in the expression; in this particular
case, (short int) {(short unsigned int) i_44, +, 1}_1 cannot be folded
to {(short int) i_44, +, 1}_1, as the former may wrap, but the latter
cannot (assuming no overflow semantics for signed integer operations).
Zdenek