1 /* { dg-do compile } */
2 /* { dg-options "-O3 -Warray-bounds" } */
4 int f(unsigned len
, int buflen
)
9 int b
[17]; /* needed <= 17 to trigger Warning */
10 int j
= 0; /* needed to trigger Warning */
13 taillen
= buflen
& 7; /* taillen [0..7] */
15 if(taillen
) { /* taillen [1..7] */
16 slen
= 8 - taillen
; /* slen [7..1] */
17 if (len
<slen
) /* needed to trigger Warning */
18 slen
=len
; /* slen' < slen */
19 for(i
=0; i
<slen
; i
++) {
20 j
= b
[taillen
]; /* taillen + slen = [1..7] + [7..1] = 8 */