"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "test/OpenMP/parallel_sections_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_sections_messages.cpp  (cfe-8.0.1.src.tar.xz):parallel_sections_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 xxx(int argc) {
int x; // expected-note {{initialize the variable 'x' to silence this warning}
}
#pragma omp parallel sections
{
argc = x; // expected-warning {{variable 'x' is uninitialized when used here}}
}
}
void foo() { void foo() {
} }
#pragma omp parallel sections // expected-error {{unexpected OpenMP directive '# pragma omp parallel sections'}} #pragma omp parallel sections // expected-error {{unexpected OpenMP directive '# pragma omp parallel sections'}}
int main(int argc, char **argv) { int main(int argc, char **argv) {
#pragma omp parallel sections {// expected-warning {{extra tokens at the end of '#pragma omp parallel sections' are ignored}} #pragma omp parallel sections {// expected-warning {{extra tokens at the end of '#pragma omp parallel sections' are ignored}}
{ {
foo(); foo();
skipping to change at line 65 skipping to change at line 73
#pragma omp parallel sections #pragma omp parallel sections
{ {
foo(); foo();
break; // expected-error {{'break' statement not in loop or switch stat ement}} break; // expected-error {{'break' statement not in loop or switch stat ement}}
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 sections default(none) #pragma omp parallel sections default(none) // expected-note {{explicit data sha ring attribute requested here}}
{ {
++argc; // expected-error {{variable 'argc' must have explicitly specified d ata sharing attributes}} ++argc; // expected-error {{variable 'argc' must have explicitly specified d ata sharing attributes}}
} }
goto L2; // expected-error {{use of undeclared label 'L2'}} goto L2; // expected-error {{use of undeclared label 'L2'}}
#pragma omp parallel sections #pragma omp parallel sections
{ {
L2: L2:
foo(); foo();
} }
 End of changes. 3 change blocks. 
3 lines changed or deleted 13 lines changed or added

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