Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gcc.dg/Warray-bounds-8.c @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 /* { dg-do compile } */ |
2 /* { dg-options "-O3 -Wall" } */ | |
3 /* based on PR 43833 */ | |
4 | |
5 extern unsigned char data[5]; | |
6 | |
7 unsigned char | |
8 foo (char *str) | |
9 { | |
10 int i, j; | |
11 unsigned char c = 0; | |
12 | |
13 for (i = 0; i < 8; i++) | |
14 { | |
15 j = i * 5; | |
16 if ((j % 8) > 3) | |
17 c |= data[(j / 8) + 1]; | |
18 } | |
19 return c; | |
20 } |