https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90367
--- Comment #7 from Alexandre Ganea ---
I used the following GCC version for preprocessing/compiling:
$ /usr/bin/c++ --version
c++ (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90367
--- Comment #6 from Alexandre Ganea ---
...and the command-line:
/usr/bin/c++ -DGTEST_HAS_RTTI=0 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Ilib/Target/AMDGPU
-I/mnt/f/svn/llvm/lib/Target/AMDGPU -Iinclu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90367
--- Comment #5 from Alexandre Ganea ---
Created attachment 46306
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46306&action=edit
preprocessed source
Please see attachement.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90367
--- Comment #4 from Andrew Pinski ---
Can you attach the original preprocessed source?
the original case does look like it looks like a bug.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90367
--- Comment #3 from Alexandre Ganea ---
Another strange thing, if I change 'SDValue NewBldVec[4];' to 'SDValue
NewBldVec[14];' in the code where the issue occurs, the warning goes away. If I
set it to 13 or less, the warning is still there.
http
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90367
--- Comment #2 from Alexandre Ganea ---
Slighly modified version with zero-init variables still shows the warning:
https://godbolt.org/z/Mht3uF
Andrew: you say "I think you reduced it too much". I simply used "gcc file.cpp
-O3 -Warray-bounds | g
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90367
--- Comment #1 from Andrew Pinski ---
I think you reduced it too much. Because with the reduction the warning is
correct. j[i] will be accessed above the array bounds. Though j[0] is always
equal to j[0].