Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gcc.dg/tree-ssa/pr94125.c @ 152:2b5abeee2509
update gcc11
author | anatofuz |
---|---|
date | Mon, 25 May 2020 07:50:57 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
145:1830386684a0 | 152:2b5abeee2509 |
---|---|
1 /* { dg-do run } */ | |
2 /* { dg-options "-O3" } */ | |
3 | |
4 unsigned char b, f; | |
5 short d[1][8][1], *g = &d[0][3][0]; | |
6 | |
7 void __attribute__((noinline)) foo () | |
8 { | |
9 int k[256] = { 0, 0, 0, 4, 0, 0 }; | |
10 for (int c = 252; c >= 0; c--) | |
11 { | |
12 b = f; | |
13 *g = k[c + 3]; | |
14 k[c + 1] = 0; | |
15 } | |
16 for (int i = 0; i < 8; i++) | |
17 if (d[0][i][0] != 0) | |
18 __builtin_abort (); | |
19 } | |
20 | |
21 void __attribute__((noinline)) bar () | |
22 { | |
23 int k[256] = { 0, 0, 0, 4, 0, 0 }; | |
24 k[255] = 4; | |
25 for (int c = 0; c <=252; c++) | |
26 { | |
27 b = f; | |
28 *g = k[c + 3]; | |
29 k[c + 1] = 0; | |
30 } | |
31 for (int i = 0; i < 8; i++) | |
32 if ((i == 3 && d[0][i][0] != 4) || (i != 3 && d[0][i][0] != 0)) | |
33 __builtin_abort (); | |
34 } | |
35 | |
36 int main () | |
37 { | |
38 foo (); | |
39 bar (); | |
40 return 0; | |
41 } |