[Bug tree-optimization/87926] New: bad array-index warning breaks --disable-checking bootstrap
nathan at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Nov 7 22:38:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87926
Bug ID: 87926
Summary: bad array-index warning breaks --disable-checking
bootstrap
Product: gcc
Version: 9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: nathan at gcc dot gnu.org
Target Milestone: ---
Created attachment 44967
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44967&action=edit
cc1plus bug.ii -O2 -W -Wall -quiet
x86_64-linux --disable-checking bootstrap fails with:
../../../src/gcc/bitmap.c: In function ‘unsigned int
bitmap_last_set_bit(const_bitmap)’:
../../../src/gcc/bitmap.c:1191:26: error: array subscript -1 is below array
bounds of ‘const BITMAP_WORD [2]’ {aka ‘const long unsigned int [2]’}
[-Werror=array-bounds]
1191 | word = elt->bits[ix];
| ~~~~~~~~~~~~^
Attached is a reduced testcase
Adding:
bitmap.o-warn = -Wno-error
to gcc/Makefile.in works around the problem.
More information about the Gcc-bugs
mailing list