"Fossies" - the Fresh Open Source Software Archive  

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

parallel_messages.cpp  (cfe-8.0.1.src.tar.xz):parallel_messages.cpp  (cfe-9.0.0.src.tar.xz)
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s // RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s -Wunini tialized
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s // RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s -W uninitialized
void foo() { void foo() {
} }
void xxx(int argc) {
int x; // expected-note {{initialize the variable 'x' to silence this warning}
}
#pragma omp parallel
argc = x; // expected-warning {{variable 'x' is uninitialized when used here}}
}
#pragma omp parallel // expected-error {{unexpected OpenMP directive '#pragma om p parallel'}} #pragma omp parallel // expected-error {{unexpected OpenMP directive '#pragma om p parallel'}}
int a;
struct S; struct S;
S& bar(); S& bar();
int main(int argc, char **argv) { int main(int argc, char **argv) {
S &s = bar(); S &s = bar();
#pragma omp parallel #pragma omp parallel
(void)&s; (void)&s;
#pragma omp parallel { // expected-warning {{extra tokens at the end of '#prag ma omp parallel' are ignored}} #pragma omp parallel { // expected-warning {{extra tokens at the end of '#prag ma omp parallel' are ignored}}
foo(); foo();
#pragma omp parallel ( // expected-warning {{extra tokens at the end of '#prag ma omp parallel' are ignored}} #pragma omp parallel ( // expected-warning {{extra tokens at the end of '#prag ma omp parallel' are ignored}}
foo(); foo();
skipping to change at line 57 skipping to change at line 64
#pragma omp parallel #pragma omp parallel
{ {
foo(); foo();
break; // expected-error {{'break' statement not in loop or switch state ment}} break; // expected-error {{'break' statement not in loop or switch state ment}}
continue; // expected-error {{'continue' statement not in loop statement }} continue; // expected-error {{'continue' statement not in loop statement }}
} }
default: default:
break; break;
} }
} }
#pragma omp parallel default(none) #pragma omp parallel default(none) // expected-note 2 {{explicit data sharing at
++argc; // expected-error {{variable 'argc' must have explicitly specified dat tribute requested here}}
a sharing attributes}} {
++argc; // expected-error {{variable 'argc' must have explicitly specified d
ata sharing attributes}}
++a; // expected-error {{variable 'a' must have explicitly specified data
sharing attributes}}
}
goto L2; // expected-error {{use of undeclared label 'L2'}} goto L2; // expected-error {{use of undeclared label 'L2'}}
#pragma omp parallel #pragma omp parallel
L2: L2:
foo(); foo();
#pragma omp parallel #pragma omp parallel
{ {
return 1; // expected-error {{cannot return from OpenMP region}} return 1; // expected-error {{cannot return from OpenMP region}}
} }
[[]] // expected-error {{an attribute list cannot appear here}} [[]] // expected-error {{an attribute list cannot appear here}}
#pragma omp parallel #pragma omp parallel
for (int n = 0; n < 100; ++n) {} for (int n = 0; n < 100; ++n) {}
return 0; return 0;
} }
struct a {
static constexpr int b = 0;
};
template <bool> struct c;
template <typename d, typename e> bool operator<(d, e);
struct f {
int cbegin;
};
class g {
f blocks;
void j();
};
template <typename> struct is_error_code_enum : a {};
struct h {
template <typename i, typename = c<is_error_code_enum<i>::b>> h(i);
};
h operator<(h, h);
void g::j() {
#pragma omp parallel for default(none) if(a::b)
for (auto a = blocks.cbegin; a < blocks; ++a) // expected-error {{invalid oper
ands to binary expression ('f' and 'int')}}
;
}
 End of changes. 6 change blocks. 
5 lines changed or deleted 18 lines changed or added

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