"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "test/OpenMP/target_update_if_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.

target_update_if_messages.cpp  (cfe-8.0.1.src.tar.xz):target_update_if_messages.cpp  (cfe-9.0.0.src.tar.xz)
// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s // RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wu ninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 % s // RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 % s -Wuninitialized
void foo() { void foo() {
} }
bool foobool(int argc) { bool foobool(int argc) {
return argc; return argc;
} }
void xxx(int argc) {
int cond; // expected-note {{initialize the variable 'cond' to silence this wa
rning}}
#pragma omp target update to(argc) if(cond) // expected-warning {{variable 'cond
' is uninitialized when used here}}
for (int i = 0; i < 10; ++i)
;
}
struct S1; // expected-note {{declared here}} struct S1; // expected-note {{declared here}}
template <class T, class S> // expected-note {{declared here}} template <class T, class S> // expected-note {{declared here}}
int tmain(T argc, S **argv) { int tmain(T argc, S **argv) {
int n; int n;
#pragma omp target update to(n) if // expected-error {{expected '(' after 'if'}} #pragma omp target update to(n) if // expected-error {{expected '(' after 'if'}}
#pragma omp target update from(n) if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp target update from(n) if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp target update to(n) if () // expected-error {{expected expression}} #pragma omp target update to(n) if () // expected-error {{expected expression}}
#pragma omp target update from(n) if (argc // expected-error {{expected ')'}} ex pected-note {{to match this '('}} #pragma omp target update from(n) if (argc // expected-error {{expected ')'}} ex pected-note {{to match this '('}}
#pragma omp target update to(n) if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target update' are ignored}} #pragma omp target update to(n) if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target update' are ignored}}
#pragma omp target update from(n) if (argc > 0 ? argv[1] : argv[2]) #pragma omp target update from(n) if (argc > 0 ? argv[1] : argv[2])
#pragma omp target update to(n) if (foobool(argc)), if (true) // expected-error {{directive '#pragma omp target update' cannot contain more than one 'if' clause }} #pragma omp target update to(n) if (foobool(argc)), if (true) // expected-error {{directive '#pragma omp target update' cannot contain more than one 'if' clause }}
#pragma omp target update from(n) if (S) // expected-error {{'S' does not refer to a value}} #pragma omp target update from(n) if (S) // expected-error {{'S' does not refer to a value}}
#pragma omp target update to(n) if (argv[1]=2) // expected-error {{expected ')'} } expected-note {{to match this '('}} #pragma omp target update to(n) if (argv[1]=2) // expected-error {{expected ')'} } expected-note {{to match this '('}}
#pragma omp target update from(n) if (argc argc) // expected-error {{expected ') '}} expected-note {{to match this '('}} #pragma omp target update from(n) if (argc argc) // expected-error {{expected ') '}} expected-note {{to match this '('}}
#pragma omp target update to(n) if(argc) #pragma omp target update to(n) if(argc + n)
#pragma omp target update from(n) if(target update // expected-error {{use of un declared identifier 'target'}} expected-error {{expected ')'}} expected-note {{t o match this '('}} #pragma omp target update from(n) if(target update // expected-error {{use of un declared identifier 'target'}} expected-error {{expected ')'}} expected-note {{t o match this '('}}
#pragma omp target update to(n) if(target update : // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp target update to(n) if(target update : // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp target update from(n) if(target update : argc // expected-error {{ex pected ')'}} expected-note {{to match this '('}} #pragma omp target update from(n) if(target update : argc // expected-error {{ex pected ')'}} expected-note {{to match this '('}}
#pragma omp target update to(n) if(target update : argc) #pragma omp target update to(n) if(target update : argc + n)
#pragma omp target update from(n) if(target update : argc) if (for:argc) // expe cted-error {{directive name modifier 'for' is not allowed for '#pragma omp targe t update'}} #pragma omp target update from(n) if(target update : argc) if (for:argc) // expe cted-error {{directive name modifier 'for' is not allowed for '#pragma omp targe t update'}}
#pragma omp target update to(n) if(target update : argc) if (target update:argc) // expected-error {{directive '#pragma omp target update' cannot contain more t han one 'if' clause with 'target update' name modifier}} #pragma omp target update to(n) if(target update : argc) if (target update:argc) // expected-error {{directive '#pragma omp target update' cannot contain more t han one 'if' clause with 'target update' name modifier}}
#pragma omp target update from(n) if(target update : argc) if (argc) // expected -error {{no more 'if' clause is allowed}} expected-note {{previous clause with d irective name modifier specified here}} #pragma omp target update from(n) if(target update : argc) if (argc) // expected -error {{no more 'if' clause is allowed}} expected-note {{previous clause with d irective name modifier specified here}}
return 0; return 0;
} }
int main(int argc, char **argv) { int main(int argc, char **argv) {
int m; int m;
#pragma omp target update to(m) if // expected-error {{expected '(' after 'if'}} #pragma omp target update to(m) if // expected-error {{expected '(' after 'if'}}
#pragma omp target update from(m) if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp target update from(m) if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
skipping to change at line 55 skipping to change at line 62
#pragma omp target update from(m) if (argc > 0 ? argv[1] : argv[2]) #pragma omp target update from(m) if (argc > 0 ? argv[1] : argv[2])
#pragma omp target update to(m) if (foobool(argc)), if (true) // expected-error {{directive '#pragma omp target update' cannot contain more than one 'if' clause }} #pragma omp target update to(m) if (foobool(argc)), if (true) // expected-error {{directive '#pragma omp target update' cannot contain more than one 'if' clause }}
#pragma omp target update from(m) if (S1) // expected-error {{'S1' does not refe r to a value}} #pragma omp target update from(m) if (S1) // expected-error {{'S1' does not refe r to a value}}
#pragma omp target update to(m) if (argv[1]=2) // expected-error {{expected ')'} } expected-note {{to match this '('}} #pragma omp target update to(m) if (argv[1]=2) // expected-error {{expected ')'} } expected-note {{to match this '('}}
#pragma omp target update from(m) if (argc argc) // expected-error {{expected ') '}} expected-note {{to match this '('}} #pragma omp target update from(m) if (argc argc) // expected-error {{expected ') '}} expected-note {{to match this '('}}
#pragma omp target update to(m) if (1 0) // expected-error {{expected ')'}} expe cted-note {{to match this '('}} #pragma omp target update to(m) if (1 0) // expected-error {{expected ')'}} expe cted-note {{to match this '('}}
#pragma omp target update from(m) if(if(tmain(argc, argv) // expected-error {{ex pected expression}} expected-error {{expected ')'}} expected-note {{to match thi s '('}} #pragma omp target update from(m) if(if(tmain(argc, argv) // expected-error {{ex pected expression}} expected-error {{expected ')'}} expected-note {{to match thi s '('}}
#pragma omp target update to(m) if(target update // expected-error {{use of unde clared identifier 'target'}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp target update to(m) if(target update // expected-error {{use of unde clared identifier 'target'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
#pragma omp target update from(m) if(target update : // expected-error {{expecte d expression}} expected-error {{expected ')'}} expected-note {{to match this '(' }} #pragma omp target update from(m) if(target update : // expected-error {{expecte d expression}} expected-error {{expected ')'}} expected-note {{to match this '(' }}
#pragma omp target update to(m) if(target update : argc // expected-error {{expe cted ')'}} expected-note {{to match this '('}} #pragma omp target update to(m) if(target update : argc // expected-error {{expe cted ')'}} expected-note {{to match this '('}}
#pragma omp target update from(m) if(target update : argc) #pragma omp target update from(m) if(target update : argc + m)
#pragma omp target update to(m) if(target update : argc) if (for:argc) // expect ed-error {{directive name modifier 'for' is not allowed for '#pragma omp target update'}} #pragma omp target update to(m) if(target update : argc) if (for:argc) // expect ed-error {{directive name modifier 'for' is not allowed for '#pragma omp target update'}}
#pragma omp target update from(m) if(target update : argc) if (target update:arg c) // expected-error {{directive '#pragma omp target update' cannot contain mor e than one 'if' clause with 'target update' name modifier}} #pragma omp target update from(m) if(target update : argc) if (target update:arg c) // expected-error {{directive '#pragma omp target update' cannot contain mor e than one 'if' clause with 'target update' name modifier}}
#pragma omp target update to(m) if(target update : argc) if (argc) // expected-e rror {{no more 'if' clause is allowed}} expected-note {{previous clause with dir ective name modifier specified here}} #pragma omp target update to(m) if(target update : argc) if (argc) // expected-e rror {{no more 'if' clause is allowed}} expected-note {{previous clause with dir ective name modifier specified here}}
return tmain(argc, argv); return tmain(argc, argv);
} }
 End of changes. 6 change blocks. 
5 lines changed or deleted 14 lines changed or added

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