"Fossies" - the Fresh Open Source Software Archive  

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

taskgroup_task_reduction_messages.cpp  (cfe-8.0.1.src.tar.xz):taskgroup_task_reduction_messages.cpp  (cfe-9.0.0.src.tar.xz)
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s // RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s // RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wunini
// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s tialized
// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wunini
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s tialized
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s // RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitializ
ed
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -W
uninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -W
uninitialized
extern int omp_default_mem_alloc;
void foo() { void foo() {
} }
bool foobool(int argc) { bool foobool(int argc) {
return argc; return argc;
} }
void foobar(int &ref) { void foobar(int &ref) {
#pragma omp taskgroup task_reduction(+:ref) #pragma omp taskgroup task_reduction(+:ref)
foo(); foo();
skipping to change at line 87 skipping to change at line 88
} o; } o;
S3 h, k; S3 h, k;
#pragma omp threadprivate(h) // expected-note 2 {{defined as threadprivate or th read local}} #pragma omp threadprivate(h) // expected-note 2 {{defined as threadprivate or th read local}}
template <class T> // expected-note {{declared here}} template <class T> // expected-note {{declared here}}
T tmain(T argc) { T tmain(T argc) {
const T d = T(); // expected-note 4 {{'d' defined here}} const T d = T(); // expected-note 4 {{'d' defined here}}
const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
T qa[5] = {T()}; T qa[5] = {T()};
T i; T i, z;
T &j = i; // expected-note 2 {{'j' defined here}} T &j = i; // expected-note 2 {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}}
const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}}
T &q = qa[(int)i]; T &q = qa[(int)i];
T fl; T fl;
#pragma omp taskgroup task_reduction // expected-error {{expected '(' after 'tas k_reduction'}} #pragma omp taskgroup task_reduction // expected-error {{expected '(' after 'tas k_reduction'}}
foo(); foo();
#pragma omp taskgroup task_reduction + // expected-error {{expected '(' after 't ask_reduction'}} expected-warning {{extra tokens at the end of '#pragma omp task group' are ignored}} #pragma omp taskgroup task_reduction + // expected-error {{expected '(' after 't ask_reduction'}} expected-warning {{extra tokens at the end of '#pragma omp task group' are ignored}}
foo(); foo();
#pragma omp taskgroup task_reduction( // expected-error {{expected unqualified-i d}} expected-warning {{missing ':' after reduction identifier - ignoring}} expec ted-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp taskgroup task_reduction( // expected-error {{expected unqualified-i d}} expected-warning {{missing ':' after reduction identifier - ignoring}} expec ted-error {{expected ')'}} expected-note {{to match this '('}}
skipping to change at line 115 skipping to change at line 116
#pragma omp taskgroup task_reduction(\) // expected-error {{expected unqualified -id}} expected-warning {{missing ':' after reduction identifier - ignoring}} #pragma omp taskgroup task_reduction(\) // expected-error {{expected unqualified -id}} expected-warning {{missing ':' after reduction identifier - ignoring}}
foo(); foo();
#pragma omp taskgroup task_reduction(& : argc // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{invalid operands to binary expression ('float' and 'float')}} #pragma omp taskgroup task_reduction(& : argc // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{invalid operands to binary expression ('float' and 'float')}}
foo(); foo();
#pragma omp taskgroup task_reduction(| : argc, // expected-error {{expected expr ession}} expected-error {{expected ')'}} expected-note {{to match this '('}} exp ected-error {{invalid operands to binary expression ('float' and 'float')}} #pragma omp taskgroup task_reduction(| : argc, // expected-error {{expected expr ession}} expected-error {{expected ')'}} expected-note {{to match this '('}} exp ected-error {{invalid operands to binary expression ('float' and 'float')}}
foo(); foo();
#pragma omp taskgroup task_reduction(|| : argc ? i : argc) // expected-error 2 { {expected variable name, array element or array section}} #pragma omp taskgroup task_reduction(|| : argc ? i : argc) // expected-error 2 { {expected variable name, array element or array section}}
foo(); foo();
#pragma omp taskgroup task_reduction(foo : argc) //expected-error {{incorrect re duction identifier, expected one of '+', '-', '*', '&', '|', '^', '&&', '||', 'm in' or 'max' or declare reduction for type 'float'}} expected-error {{incorrect reduction identifier, expected one of '+', '-', '*', '&', '|', '^', '&&', '||', 'min' or 'max' or declare reduction for type 'int'}} #pragma omp taskgroup task_reduction(foo : argc) //expected-error {{incorrect re duction identifier, expected one of '+', '-', '*', '&', '|', '^', '&&', '||', 'm in' or 'max' or declare reduction for type 'float'}} expected-error {{incorrect reduction identifier, expected one of '+', '-', '*', '&', '|', '^', '&&', '||', 'min' or 'max' or declare reduction for type 'int'}}
foo(); foo();
#pragma omp taskgroup task_reduction(&& : argc) #pragma omp taskgroup task_reduction(&& : argc) allocate , allocate(, allocate(o mp_default , allocate(omp_default_mem_alloc, allocate(omp_default_mem_alloc:, al locate(omp_default_mem_alloc: argc, allocate(omp_default_mem_alloc: argv), alloc ate(argv) // expected-error {{expected '(' after 'allocate'}} expected-error 2 { {expected expression}} expected-error 2 {{expected ')'}} expected-error {{use of undeclared identifier 'omp_default'}} expected-note 2 {{to match this '('}}
foo(); foo();
#pragma omp taskgroup task_reduction(^ : T) // expected-error {{'T' does not ref er to a value}} #pragma omp taskgroup task_reduction(^ : T) // expected-error {{'T' does not ref er to a value}}
foo(); foo();
#pragma omp taskgroup task_reduction(+ : a, b, c, d, f) // expected-error {{a re duction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be task_reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} #pragma omp taskgroup task_reduction(+ : a, b, c, d, f) // expected-error {{a re duction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be task_reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
foo(); foo();
#pragma omp taskgroup task_reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'task_reduction' for 'min' or 'max' must be of arithmetic type}} e xpected-error 3 {{const-qualified variable cannot be task_reduction}} #pragma omp taskgroup task_reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'task_reduction' for 'min' or 'max' must be of arithmetic type}} e xpected-error 3 {{const-qualified variable cannot be task_reduction}}
foo(); foo();
#pragma omp taskgroup task_reduction(max : h.b) // expected-error {{expected var iable name, array element or array section}} #pragma omp taskgroup task_reduction(max : h.b) // expected-error {{expected var iable name, array element or array section}}
foo(); foo();
#pragma omp taskgroup task_reduction(+ : ba) // expected-error {{const-qualified variable cannot be task_reduction}} #pragma omp taskgroup task_reduction(+ : ba) // expected-error {{const-qualified variable cannot be task_reduction}}
skipping to change at line 139 skipping to change at line 140
#pragma omp taskgroup task_reduction(- : da) // expected-error {{const-qualified variable cannot be task_reduction}} expected-error {{const-qualified variable c annot be task_reduction}} #pragma omp taskgroup task_reduction(- : da) // expected-error {{const-qualified variable cannot be task_reduction}} expected-error {{const-qualified variable c annot be task_reduction}}
foo(); foo();
#pragma omp taskgroup task_reduction(^ : fl) // expected-error {{invalid operand s to binary expression ('float' and 'float')}} #pragma omp taskgroup task_reduction(^ : fl) // expected-error {{invalid operand s to binary expression ('float' and 'float')}}
foo(); foo();
#pragma omp taskgroup task_reduction(&& : S2::S2s) // expected-error {{shared va riable cannot be reduction}} #pragma omp taskgroup task_reduction(&& : S2::S2s) // expected-error {{shared va riable cannot be reduction}}
foo(); foo();
#pragma omp taskgroup task_reduction(&& : S2::S2sc) // expected-error {{const-qu alified variable cannot be task_reduction}} #pragma omp taskgroup task_reduction(&& : S2::S2sc) // expected-error {{const-qu alified variable cannot be task_reduction}}
foo(); foo();
#pragma omp taskgroup task_reduction(+ : h, k) // expected-error {{threadprivate or thread local variable cannot be reduction}} #pragma omp taskgroup task_reduction(+ : h, k) // expected-error {{threadprivate or thread local variable cannot be reduction}}
foo(); foo();
#pragma omp taskgroup task_reduction(+ : o) // expected-error 2 {{no viable over loaded '='}} #pragma omp taskgroup task_reduction(+ : o, z) // expected-error 2 {{no viable o verloaded '='}}
foo(); foo();
#pragma omp parallel private(k) #pragma omp parallel private(k)
#pragma omp taskgroup task_reduction(+ : p), task_reduction(+ : p) // expected-e rror 2 {{argument of OpenMP clause 'task_reduction' must reference the same obje ct in all threads}} #pragma omp taskgroup task_reduction(+ : p), task_reduction(+ : p) // expected-e rror 2 {{argument of OpenMP clause 'task_reduction' must reference the same obje ct in all threads}}
foo(); foo();
#pragma omp taskgroup task_reduction(+ : p), task_reduction(+ : p) // expected-e rror 2 {{variable can appear only once in OpenMP 'task_reduction' clause}} expec ted-note 2 {{previously referenced here}} #pragma omp taskgroup task_reduction(+ : p), task_reduction(+ : p) // expected-e rror 2 {{variable can appear only once in OpenMP 'task_reduction' clause}} expec ted-note 2 {{previously referenced here}}
foo(); foo();
#pragma omp taskgroup task_reduction(+ : r) // expected-error 2 {{const-qualifie d variable cannot be task_reduction}} #pragma omp taskgroup task_reduction(+ : r) // expected-error 2 {{const-qualifie d variable cannot be task_reduction}}
foo(); foo();
#pragma omp parallel shared(i) #pragma omp parallel shared(i)
#pragma omp parallel reduction(min : i) #pragma omp parallel reduction(min : i)
skipping to change at line 180 skipping to change at line 181
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 2 {{'d' defined here}} const int d = 5; // expected-note 2 {{'d' defined here}}
const int da[5] = {0}; // expected-note {{'da' defined here}} const int da[5] = {0}; // expected-note {{'da' defined here}}
int qa[5] = {0}; int qa[5] = {0};
S4 e(4); S4 e(4);
S5 g(5); S5 g(5);
int i; int i, z;
int &j = i; // expected-note {{'j' defined here}} int &j = i; // expected-note {{'j' defined here}}
S3 &p = k; // expected-note 2 {{'p' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}}
const int &r = da[i]; // expected-note {{'r' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}}
int &q = qa[i]; int &q = qa[i];
float fl; float fl;
#pragma omp taskgroup task_reduction // expected-error {{expected '(' after 'tas k_reduction'}} #pragma omp taskgroup task_reduction // expected-error {{expected '(' after 'tas k_reduction'}}
foo(); foo();
#pragma omp taskgroup task_reduction + // expected-error {{expected '(' after 't ask_reduction'}} expected-warning {{extra tokens at the end of '#pragma omp task group' are ignored}} #pragma omp taskgroup task_reduction + // expected-error {{expected '(' after 't ask_reduction'}} expected-warning {{extra tokens at the end of '#pragma omp task group' are ignored}}
foo(); foo();
#pragma omp taskgroup task_reduction( // expected-error {{expected unqualified-i d}} expected-warning {{missing ':' after reduction identifier - ignoring}} expec ted-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp taskgroup task_reduction( // expected-error {{expected unqualified-i d}} expected-warning {{missing ':' after reduction identifier - ignoring}} expec ted-error {{expected ')'}} expected-note {{to match this '('}}
skipping to change at line 234 skipping to change at line 235
#pragma omp taskgroup task_reduction(^ : fl) // expected-error {{invalid operand s to binary expression ('float' and 'float')}} #pragma omp taskgroup task_reduction(^ : fl) // expected-error {{invalid operand s to binary expression ('float' and 'float')}}
foo(); foo();
#pragma omp taskgroup task_reduction(&& : S2::S2s) // expected-error {{shared va riable cannot be reduction}} #pragma omp taskgroup task_reduction(&& : S2::S2s) // expected-error {{shared va riable cannot be reduction}}
foo(); foo();
#pragma omp taskgroup task_reduction(&& : S2::S2sc) // expected-error {{const-qu alified variable cannot be task_reduction}} #pragma omp taskgroup task_reduction(&& : S2::S2sc) // expected-error {{const-qu alified variable cannot be task_reduction}}
foo(); foo();
#pragma omp taskgroup task_reduction(& : e, g) // expected-error {{calling a pri vate constructor of class 'S4'}} expected-error {{nvalid operands to binary expr ession ('S4' and 'S4')}} expected-error {{calling a private constructor of class 'S5'}} expected-error {{invalid operands to binary expression ('S5' and 'S5')}} #pragma omp taskgroup task_reduction(& : e, g) // expected-error {{calling a pri vate constructor of class 'S4'}} expected-error {{nvalid operands to binary expr ession ('S4' and 'S4')}} expected-error {{calling a private constructor of class 'S5'}} expected-error {{invalid operands to binary expression ('S5' and 'S5')}}
foo(); foo();
#pragma omp taskgroup task_reduction(+ : h, k, B::x) // expected-error 2 {{threa dprivate or thread local variable cannot be reduction}} #pragma omp taskgroup task_reduction(+ : h, k, B::x) // expected-error 2 {{threa dprivate or thread local variable cannot be reduction}}
foo(); foo();
#pragma omp taskgroup task_reduction(+ : o) // expected-error {{no viable overlo aded '='}} #pragma omp taskgroup task_reduction(+ : o, z) // expected-error {{no viable ove rloaded '='}}
foo(); foo();
#pragma omp parallel private(k) #pragma omp parallel private(k)
#pragma omp taskgroup task_reduction(+ : p), task_reduction(+ : p) // expected-e rror 2 {{argument of OpenMP clause 'task_reduction' must reference the same obje ct in all threads}} #pragma omp taskgroup task_reduction(+ : p), task_reduction(+ : p) // expected-e rror 2 {{argument of OpenMP clause 'task_reduction' must reference the same obje ct in all threads}}
foo(); foo();
#pragma omp taskgroup task_reduction(+ : p), task_reduction(+ : p) // expected-e rror {{variable can appear only once in OpenMP 'task_reduction' clause}} expecte d-note {{previously referenced here}} #pragma omp taskgroup task_reduction(+ : p), task_reduction(+ : p) // expected-e rror {{variable can appear only once in OpenMP 'task_reduction' clause}} expecte d-note {{previously referenced here}}
foo(); foo();
#pragma omp taskgroup task_reduction(+ : r) // expected-error {{const-qualified variable cannot be task_reduction}} #pragma omp taskgroup task_reduction(+ : r) // expected-error {{const-qualified variable cannot be task_reduction}}
foo(); foo();
#pragma omp parallel shared(i) #pragma omp parallel shared(i)
#pragma omp parallel reduction(min : i) #pragma omp parallel reduction(min : i)
 End of changes. 7 change blocks. 
12 lines changed or deleted 18 lines changed or added

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