Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/gomp/scan-1.C @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | |
children |
line wrap: on
line source
// { dg-do compile { target c++11 } } struct S { S (); ~S (); S &operator = (const S &) = delete; int s; }; // { dg-message "declared here" } #pragma omp declare reduction (+ : S : omp_out.s += omp_in.s) S s; void foo (void) { #pragma omp simd reduction (+: s) for (int i = 0; i < 64; ++i) s.s += i; } void bar (int *x) { #pragma omp simd reduction (inscan, +: s) // { dg-error "use of deleted function" } for (int i = 0; i < 64; ++i) { s.s += i; #pragma omp scan inclusive (s) // { dg-error "" } x[i] = s.s; } }