Debian Codegraph @

gcc/testsuite/c-c++-common/pr118205.c

raw
1 /* PR tree-optimization/118205 */
2
3 /* { dg-do compile } */
4 /* { dg-require-effective-target fgraphite } */
5 /* { dg-require-effective-target pthread } */
6 /* { dg-options "-O -floop-parallelize-all -ftree-parallelize-loops=2" } */
7
8 int x;
9 void g(int);
10 int f() {
11 unsigned res = 0;
12 int arr[] = {};
13 int y = 0;
14 for (unsigned int i = 1; i; i++)
15 {
16 for (int n = 0; n < 2; n++)
17 {
18 g(arr[i]);
19 res = y > x ? y : x;
20 y = res;
21 }
22 g(arr[i]);
23 }
24 return res;
25 }