"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "test/OpenMP/task_private_messages.cpp" between
cfe-8.0.1.src.tar.xz and cfe-9.0.0.src.tar.xz

About: Clang is an LLVM front end for the C, C++, and Objective-C languages. Clang aims to provide a better user experience through expressive diagnostics, a high level of conformance to language standards, fast compilation, and low memory use.

task_private_messages.cpp  (cfe-8.0.1.src.tar.xz):task_private_messages.cpp  (cfe-9.0.0.src.tar.xz)
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s // RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s // RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
typedef void **omp_allocator_handle_t;
extern const omp_allocator_handle_t omp_default_mem_alloc;
extern const omp_allocator_handle_t omp_large_cap_mem_alloc;
extern const omp_allocator_handle_t omp_const_mem_alloc;
extern const omp_allocator_handle_t omp_high_bw_mem_alloc;
extern const omp_allocator_handle_t omp_low_lat_mem_alloc;
extern const omp_allocator_handle_t omp_cgroup_mem_alloc;
extern const omp_allocator_handle_t omp_pteam_mem_alloc;
extern const omp_allocator_handle_t omp_thread_mem_alloc;
void foo() { void foo() {
} }
bool foobool(int argc) { bool foobool(int argc) {
return argc; return argc;
} }
struct S1; // expected-note {{declared here}} expected-note{{forward declaration of 'S1'}} struct S1; // expected-note {{declared here}} expected-note{{forward declaration of 'S1'}}
extern S1 a; extern S1 a;
skipping to change at line 68 skipping to change at line 78
} }
namespace B { namespace B {
using A::x; using A::x;
} }
int main(int argc, char **argv) { int main(int argc, char **argv) {
const int d = 5; // expected-note {{'d' defined here}} const int d = 5; // expected-note {{'d' defined here}}
const int da[5] = {0}; // expected-note {{'da' defined here}} const int da[5] = {0}; // expected-note {{'da' defined here}}
S4 e(4); S4 e(4);
S5 g(5); S5 g(5);
int i; int i, z;
int &j = i; int &j = i;
#pragma omp task private // expected-error {{expec ted '(' after 'private'}} #pragma omp task private // expected-error {{expec ted '(' after 'private'}}
#pragma omp task private( // expected-error {{expec ted expression}} expected-error {{expected ')'}} expected-note {{to match this ' ('}} #pragma omp task private( // expected-error {{expec ted expression}} expected-error {{expected ')'}} expected-note {{to match this ' ('}}
#pragma omp task private() // expected-error {{expec ted expression}} #pragma omp task private() // expected-error {{expec ted expression}}
#pragma omp task private(argc // expected-error {{expec ted ')'}} expected-note {{to match this '('}} #pragma omp task private(argc // expected-error {{expec ted ')'}} expected-note {{to match this '('}}
#pragma omp task private(argc, // expected-error {{expec ted expression}} expected-error {{expected ')'}} expected-note {{to match this ' ('}} #pragma omp task private(argc, // expected-error {{expec ted expression}} expected-error {{expected ')'}} expected-note {{to match this ' ('}}
#pragma omp task private(argc > 0 ? argv[1] : argv[2]) // expected-error {{expec ted variable name}} #pragma omp task private(argc > 0 ? argv[1] : argv[2]) // expected-error {{expec ted variable name}}
#pragma omp task private(argc argv) // expected-error {{expec ted ',' or ')' in 'private' clause}} #pragma omp task private(argc argv) // expected-error {{expec ted ',' or ')' in 'private' clause}}
#pragma omp task private(S1) // expected-error {{'S1' does not refer to a value}} #pragma omp task private(S1) // expected-error {{'S1' does not refer to a value}}
#pragma omp task private(a, b, c, d, f) // expected-error {{a pri vate variable with incomplete type 'S1'}} expected-error 1 {{const-qualified var iable without mutable fields cannot be private}} expected-error 2 {{const-qualif ied variable cannot be private}} #pragma omp task private(z, a, b, c, d, f) // expected-error {{a private variable with incomplete type 'S1'}} expected-error 1 {{const-qualified variable without mutable fields cannot be private}} expected-error 2 {{const-qua lified variable cannot be private}}
#pragma omp task private(argv[1]) // expected-error {{expec ted variable name}} #pragma omp task private(argv[1]) // expected-error {{expec ted variable name}}
#pragma omp task private(ba) #pragma omp task private(ba) allocate , allocate(, allocate(omp_default , alloca te(omp_default_mem_alloc, allocate(omp_default_mem_alloc:, allocate(omp_default_ mem_alloc: argc, allocate(omp_default_mem_alloc: argv), allocate(argv) // expect ed-error {{expected '(' after 'allocate'}} expected-error 2 {{expected expressio n}} expected-error 2 {{expected ')'}} expected-error {{use of undeclared identif ier 'omp_default'}} expected-note 2 {{to match this '('}}
#pragma omp task private(ca) // expected-error {{const-qualified varia ble without mutable fields cannot be private}} #pragma omp task private(ca) // expected-error {{const-qualified varia ble without mutable fields cannot be private}}
#pragma omp task private(da) // expected-error {{const-qualified varia ble cannot be private}} #pragma omp task private(da) // expected-error {{const-qualified varia ble cannot be private}}
#pragma omp task private(S2::S2s) // expected-error {{shared variable canno t be private}} #pragma omp task private(S2::S2s) // expected-error {{shared variable canno t be private}}
#pragma omp task private(e, g) // expected-error {{calling a private con structor of class 'S4'}} expected-error {{calling a private constructor of class 'S5'}} #pragma omp task private(e, g) // expected-error {{calling a private con structor of class 'S4'}} expected-error {{calling a private constructor of class 'S5'}}
#pragma omp task private(threadvar, B::x) // expected-error 2 {{threadprivate or thread local variable cannot be private}} #pragma omp task private(threadvar, B::x) // expected-error 2 {{threadprivate or thread local variable cannot be private}}
#pragma omp task shared(i), private(i) // expected-error {{shared variable canno t be private}} expected-note {{defined as shared}} #pragma omp task shared(i), private(i) // expected-error {{shared variable canno t be private}} expected-note {{defined as shared}}
foo(); foo();
#pragma omp task firstprivate(i) private(i) // expected-error {{firstprivate var iable cannot be private}} expected-note {{defined as firstprivate}} #pragma omp task firstprivate(i) private(i) // expected-error {{firstprivate var iable cannot be private}} expected-note {{defined as firstprivate}}
foo(); foo();
#pragma omp task private(i) #pragma omp task private(i)
#pragma omp task private(j) #pragma omp task private(j)
foo(); foo();
#pragma omp task firstprivate(i) #pragma omp task firstprivate(i)
for (int k = 0; k < 10; ++k) { for (int k = 0; k < 10; ++k) {
#pragma omp task private(i) #pragma omp task private(i) allocate(omp_thread_mem_alloc: i) // expected-warnin g {{allocator with the 'thread' trait access has unspecified behavior on 'task' directive}}
foo(); foo();
} }
static int m; static int m;
#pragma omp task private(m) // OK #pragma omp task private(m) // OK
foo(); foo();
return 0; return 0;
} }
 End of changes. 6 change blocks. 
6 lines changed or deleted 16 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)