aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/gomp/pr90954.c
blob: cc3a6e9e52aacd74f4891cb6ea91da3f2813afc4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* PR sanitizer/90954 */
/* { dg-do compile } */
/* { dg-options "-fopenmp -fsanitize=undefined" } */

float v;
int i;

void
foo (float x, float y)
{
  #pragma omp atomic
  v += x / y;
}

void
bar (int x, int y)
{
  #pragma omp atomic
  i += x / y;
}

void
baz (int x, int y)
{
  #pragma omp atomic
  i *= (x << y);
}