[Bug tree-optimization/103111] bogus stringop overflow warning

2021-11-07 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103111 Martin Sebor changed: What|Removed |Added Resolution|--- |WONTFIX Status|UNCONFIRMED

[Bug tree-optimization/103111] bogus stringop overflow warning

2021-11-06 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103111 --- Comment #1 from Andrew Pinski --- So if I add: if (savepath->s_sz <= 0) __builtin_unreachable(); Before the check/setting of ->n. I get no warning. If I unconditional set n to 0 rather than checking to see if it is greater than 0,