Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/c-c++-common/gomp/pr90954.c @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
131:84e7813d76e9 | 145:1830386684a0 |
---|---|
1 /* PR sanitizer/90954 */ | |
2 /* { dg-do compile } */ | |
3 /* { dg-options "-fopenmp -fsanitize=undefined" } */ | |
4 | |
5 float v; | |
6 int i; | |
7 | |
8 void | |
9 foo (float x, float y) | |
10 { | |
11 #pragma omp atomic | |
12 v += x / y; | |
13 } | |
14 | |
15 void | |
16 bar (int x, int y) | |
17 { | |
18 #pragma omp atomic | |
19 i += x / y; | |
20 } | |
21 | |
22 void | |
23 baz (int x, int y) | |
24 { | |
25 #pragma omp atomic | |
26 i *= (x << y); | |
27 } |