This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug other/77421] Bugs found in GCC with the help of PVS-Studio


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

--- Comment #12 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(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);

This is now PR 77444

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]