[Bug tree-optimization/115005] [gcc-13] bogus -Warray-bounds warning

2024-05-09 Thread sezeroz at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115005 Ozkan Sezer changed: What|Removed |Added Attachment #58144|0 |1 is obsolete|

[Bug tree-optimization/115005] [gcc-13] bogus -Warray-bounds warning

2024-05-09 Thread sezeroz at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115005 --- Comment #4 from Ozkan Sezer --- (In reply to Ozkan Sezer from comment #3) > > There is a jump threading there handling n==0 (aka numbits==-1u) and that is > > causing the warning. > > The thing is, n==0 is not guarding against

[Bug tree-optimization/115005] [gcc-13] bogus -Warray-bounds warning

2024-05-09 Thread sezeroz at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115005 --- Comment #3 from Ozkan Sezer --- > There is a jump threading there handling n==0 (aka numbits==-1u) and that is > causing the warning. The thing is, n==0 is not guarding against numbits==-1u: it is guarding against 0 members of

[Bug tree-optimization/115005] [gcc-13] bogus -Warray-bounds warning

2024-05-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115005 --- Comment #2 from Andrew Pinski --- Folding statement: _336 = cmd_8bits[numbits_181]; Folded into: _336 = cmd_8bits[4294967295]; Which comes from: uint32 d = get_bits(in, numbits+1, ); if (d >=