https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92397
Bug ID: 92397 Summary: real.c -Warray-bounds suspicious warning Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: dcb314 at hotmail dot com Target Milestone: --- I am in the middle of a ubsan bootstrap, and saw this: ./../trunk/gcc/real.c: In function ‘void real_roundeven(real_value*, format_helper, const real_value*)’: ../../trunk/gcc/real.c:423:13: warning: array subscript 3 is above array bounds of ‘long unsigned int [3]’ [-Warray-bounds] 423 | r->sig[w] &= ~(((unsigned long)1 << (n % HOST_BITS_PER_LONG)) - 1); | ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ../../trunk/gcc/coretypes.h:449, from ../../trunk/gcc/real.c:24: ../../trunk/gcc/real.h:56:17: note: while referencing ‘real_value::sig’ 56 | unsigned long sig[SIGSZ]; | ^~~