Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/c-c++-common/gomp/atomic-15.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
line wrap: on
line source
/* { dg-do compile } */ /* { dg-options "-fopenmp" } */ int x = 6; int main () { int v; #pragma omp atomic x = x * 7 + 6; /* { dg-error "expected|invalid form of" } */ #pragma omp atomic x = x * 7 ^ 6; /* { dg-error "expected|invalid form of" } */ #pragma omp atomic update x = x - 8 + 6; /* { dg-error "expected|invalid form of" } */ #pragma omp atomic x = x ^ 7 | 2; /* { dg-error "expected|invalid form of" } */ #pragma omp atomic x = x / 7 * 2; /* { dg-error "expected|invalid form of" } */ #pragma omp atomic x = x / 7 / 2; /* { dg-error "expected|invalid form of" } */ #pragma omp atomic capture { v = x; x = x * 7 + 6; } /* { dg-error "expected" "" { target c++ } } */ #pragma omp atomic capture { v = x; x = x * 7 ^ 6; } /* { dg-error "expected" "" { target c++ } } */ #pragma omp atomic capture { v = x; x = x - 8 + 6; } /* { dg-error "expected" "" { target c++ } } */ #pragma omp atomic capture { v = x; x = x ^ 7 | 2; } /* { dg-error "expected" "" { target c++ } } */ #pragma omp atomic capture { v = x; x = x / 7 * 2; } /* { dg-error "expected" "" { target c++ } } */ #pragma omp atomic capture { v = x; x = x / 7 / 2; } /* { dg-error "expected" "" { target c++ } } */ #pragma omp atomic capture { x = x * 7 + 6; v = x; } /* { dg-error "expected|uses two different expressions for memory" } */ #pragma omp atomic capture { x = x * 7 ^ 6; v = x; } /* { dg-error "expected|uses two different expressions for memory" } */ #pragma omp atomic capture { x = x - 8 + 6; v = x; } /* { dg-error "expected|uses two different expressions for memory" } */ #pragma omp atomic capture { x = x ^ 7 | 2; v = x; } /* { dg-error "expected|uses two different expressions for memory" } */ (void) v; return 0; }