c++: prvalue of array type [PR111286]
[official-gcc.git] / gcc / testsuite / c-c++-common / gomp / assume-4.c
blob9da2296fd1d660961c6819e5896e2f1f4f885cf5
1 /* { dg-do compile } */
2 /* { dg-options "-fopenmp -O2 -fdump-tree-optimized" } */
3 /* { dg-final { scan-tree-dump-times "return 42;" 2 "optimized" } } */
4 /* { dg-final { scan-tree-dump-not "return -1;" "optimized" } } */
6 int
7 foo (int x)
9 int y;
10 #pragma omp assume holds (x == 42)
11 y = x;
12 return y;
15 int
16 bar (int x)
18 #pragma omp assume holds (x < 42)
20 if (x == 42)
21 return -1;
22 return 42;