While compiling the bitcoin master branch (https://github.com/bitcoin/bitcoin/commit/80c8a02f1b4f6ad2b5c02595d66a74db22373ed4) having the following warnings:
0$ gcc --version
1gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
2Copyright (C) 2019 Free Software Foundation, Inc.
3This is free software; see the source for copying conditions. There is NO
4warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
5
6$ make > /dev/null
7In file included from src/secp256k1.c:16:
8src/ecmult_impl.h: In function ‘secp256k1_ecmult’:
9src/ecmult_impl.h:496:48: warning: array subscript [1, 268435456] is outside array bounds of ‘struct secp256k1_strauss_point_state[1]’ [-Warray-bounds]
10 496 | secp256k1_gej tmp = a[state->ps[np].input_pos];
11 | ~~~~~~~~~~~~~^~~~~~~~~~
12src/ecmult_impl.h:565:42: note: while referencing ‘ps’
13 565 | struct secp256k1_strauss_point_state ps[1];
14 | ^~
15src/ecmult_impl.h:502:139: warning: array subscript [1, 268435456] is outside array bounds of ‘struct secp256k1_strauss_point_state[1]’ [-Warray-bounds]
16 502 | secp256k1_fe_mul(state->zr + np * ECMULT_TABLE_SIZE(WINDOW_A), state->zr + np * ECMULT_TABLE_SIZE(WINDOW_A), &(a[state->ps[np].input_pos].z));
17 | ~~~~~~~~~~~~~^~~~~~~~~~
18src/ecmult_impl.h:565:42: note: while referencing ‘ps’
19 565 | struct secp256k1_strauss_point_state ps[1];
20 | ^~