blob: 9da2296fd1d660961c6819e5896e2f1f4f885cf5 [file] [log] [blame]
/* { dg-do compile } */
/* { dg-options "-fopenmp -O2 -fdump-tree-optimized" } */
/* { dg-final { scan-tree-dump-times "return 42;" 2 "optimized" } } */
/* { dg-final { scan-tree-dump-not "return -1;" "optimized" } } */
int
foo (int x)
{
int y;
#pragma omp assume holds (x == 42)
y = x;
return y;
}
int
bar (int x)
{
#pragma omp assume holds (x < 42)
;
if (x == 42)
return -1;
return 42;
}