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 tree-optimization/86259] min(4, strlen(s)) optimized to strlen(s) with -flto


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

--- Comment #4 from Vladimir Panteleev <gcc at thecybershadow dot net> ---
(In reply to Andrew Pinski from comment #2)
> Note gcc thinks strlen(s) is less than or equal to 3 as s is really T.s
> which is an array of 4 in size and there for the last element has to be a
> null char.

Why does that apply only to the second strcpy, then?

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