https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77444

            Bug ID: 77444
           Summary: Bogus assignments in cand_value_at
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: redi at gcc dot gnu.org
            Blocks: 77421
  Target Milestone: ---

From PR 77421

(In reply to Richard Biener from comment #11)
> (In reply to Jonathan Wakely from comment #5)
> > cand_value_at in tree-ssa-loop-ivopts.c does:
> > 
> >   tree type = TREE_TYPE (iv->base);
> >   tree steptype = type;
> >   if (POINTER_TYPE_P (type))
> >     steptype = sizetype;
> >   steptype = unsigned_type_for (type);
> > 
> > It's unclear why the last four lines aren't just:
> > 
> >   tree steptype = unsigned_type_for (type);
> 
> it should be
> 
>   if (POINTER_TYPE_P (type))
>     steptype = sizetype
>   else
>     steptype = unsigned_type_for (type);


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77421
[Bug 77421] Bugs found in GCC with the help of PVS-Studio

Reply via email to