"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "test/OpenMP/target_teams_distribute_parallel_for_num_teams_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_teams_distribute_parallel_for_num_teams_messages.cpp  (cfe-8.0.1.src.tar.xz):target_teams_distribute_parallel_for_num_teams_messages.cpp  (cfe-9.0.0.src.tar.xz)
// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s // RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s -Wunini tialized
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s // RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s -W uninitialized
void foo() { void foo() {
} }
bool foobool(int argc) { bool foobool(int argc) {
return argc; return argc;
} }
struct S1; // expected-note 2 {{declared here}} struct S1; // expected-note 2 {{declared here}}
template <typename T, int C> // expected-note {{declared here}} template <typename T, int C> // expected-note {{declared here}}
T tmain(T argc) { T tmain(T argc) {
char **a; char **a;
T z;
#pragma omp target teams distribute parallel for num_teams(C) #pragma omp target teams distribute parallel for num_teams(C)
for (int i=0; i<100; i++) foo(); for (int i=0; i<100; i++) foo();
#pragma omp target teams distribute parallel for num_teams(T) // expected-error {{'T' does not refer to a value}} #pragma omp target teams distribute parallel for num_teams(T) // expected-error {{'T' does not refer to a value}}
for (int i=0; i<100; i++) foo(); for (int i=0; i<100; i++) foo();
#pragma omp target teams distribute parallel for num_teams // expected-error {{e xpected '(' after 'num_teams'}} #pragma omp target teams distribute parallel for num_teams // expected-error {{e xpected '(' after 'num_teams'}}
for (int i=0; i<100; i++) foo(); for (int i=0; i<100; i++) foo();
#pragma omp target teams distribute parallel for num_teams( // expected-error {{ expected expression}} expected-error {{expected ')'}} expected-note {{to match t his '('}} #pragma omp target teams distribute parallel for num_teams( // expected-error {{ expected expression}} expected-error {{expected ')'}} expected-note {{to match t his '('}}
for (int i=0; i<100; i++) foo(); for (int i=0; i<100; i++) foo();
#pragma omp target teams distribute parallel for num_teams() // expected-error { {expected expression}} #pragma omp target teams distribute parallel for num_teams() // expected-error { {expected expression}}
for (int i=0; i<100; i++) foo(); for (int i=0; i<100; i++) foo();
#pragma omp target teams distribute parallel for num_teams(argc // expected-erro r {{expected ')'}} expected-note {{to match this '('}} #pragma omp target teams distribute parallel for num_teams(argc // expected-erro r {{expected ')'}} expected-note {{to match this '('}}
for (int i=0; i<100; i++) foo(); for (int i=0; i<100; i++) foo();
#pragma omp target teams distribute parallel for num_teams(argc)) // expected-wa rning {{extra tokens at the end of '#pragma omp target teams distribute parallel for' are ignored}} #pragma omp target teams distribute parallel for num_teams(argc)) // expected-wa rning {{extra tokens at the end of '#pragma omp target teams distribute parallel for' are ignored}}
for (int i=0; i<100; i++) foo(); for (int i=0; i<100; i++) foo();
#pragma omp target teams distribute parallel for num_teams(argc > 0 ? a[1] : a[2 ]) // expected-error {{expression must have integral or unscoped enumeration typ e, not 'char *'}} #pragma omp target teams distribute parallel for num_teams(argc > 0 ? a[1] : a[2 ]) // expected-error {{expression must have integral or unscoped enumeration typ e, not 'char *'}}
for (int i=0; i<100; i++) foo(); for (int i=0; i<100; i++) foo();
#pragma omp target teams distribute parallel for num_teams(argc + argc) #pragma omp target teams distribute parallel for num_teams(argc + z)
for (int i=0; i<100; i++) foo(); for (int i=0; i<100; i++) foo();
#pragma omp target teams distribute parallel for num_teams(argc), num_teams (arg c+1) // expected-error {{directive '#pragma omp target teams distribute parallel for' cannot contain more than one 'num_teams' clause}} #pragma omp target teams distribute parallel for num_teams(argc), num_teams (arg c+1) // expected-error {{directive '#pragma omp target teams distribute parallel for' cannot contain more than one 'num_teams' clause}}
for (int i=0; i<100; i++) foo(); for (int i=0; i<100; i++) foo();
#pragma omp target teams distribute parallel for num_teams(S1) // expected-error {{'S1' does not refer to a value}} #pragma omp target teams distribute parallel for num_teams(S1) // expected-error {{'S1' does not refer to a value}}
for (int i=0; i<100; i++) foo(); for (int i=0; i<100; i++) foo();
#pragma omp target teams distribute parallel for num_teams(-2) // expected-error {{argument to 'num_teams' clause must be a strictly positive integer value}} #pragma omp target teams distribute parallel for num_teams(-2) // expected-error {{argument to 'num_teams' clause must be a strictly positive integer value}}
for (int i=0; i<100; i++) foo(); for (int i=0; i<100; i++) foo();
#pragma omp target teams distribute parallel for num_teams(-10u) #pragma omp target teams distribute parallel for num_teams(-10u)
for (int i=0; i<100; i++) foo(); for (int i=0; i<100; i++) foo();
#pragma omp target teams distribute parallel for num_teams(3.14) // expected-err or 2 {{expression must have integral or unscoped enumeration type, not 'double'} } #pragma omp target teams distribute parallel for num_teams(3.14) // expected-err or 2 {{expression must have integral or unscoped enumeration type, not 'double'} }
for (int i=0; i<100; i++) foo(); for (int i=0; i<100; i++) foo();
return 0; return 0;
} }
int main(int argc, char **argv) { int main(int argc, char **argv) {
int z;
#pragma omp target teams distribute parallel for num_teams // expected-error {{e xpected '(' after 'num_teams'}} #pragma omp target teams distribute parallel for num_teams // expected-error {{e xpected '(' after 'num_teams'}}
for (int i=0; i<100; i++) foo(); for (int i=0; i<100; i++) foo();
#pragma omp target teams distribute parallel for num_teams ( // expected-error { {expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp target teams distribute parallel for num_teams ( // expected-error { {expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i=0; i<100; i++) foo(); for (int i=0; i<100; i++) foo();
#pragma omp target teams distribute parallel for num_teams () // expected-error {{expected expression}} #pragma omp target teams distribute parallel for num_teams () // expected-error {{expected expression}}
for (int i=0; i<100; i++) foo(); for (int i=0; i<100; i++) foo();
#pragma omp target teams distribute parallel for num_teams (argc // expected-err or {{expected ')'}} expected-note {{to match this '('}} #pragma omp target teams distribute parallel for num_teams (argc // expected-err or {{expected ')'}} expected-note {{to match this '('}}
for (int i=0; i<100; i++) foo(); for (int i=0; i<100; i++) foo();
#pragma omp target teams distribute parallel for num_teams (argc)) // expected-w arning {{extra tokens at the end of '#pragma omp target teams distribute paralle l for' are ignored}} #pragma omp target teams distribute parallel for num_teams (argc)) // expected-w arning {{extra tokens at the end of '#pragma omp target teams distribute paralle l for' are ignored}}
for (int i=0; i<100; i++) foo(); for (int i=0; i<100; i++) foo();
#pragma omp target teams distribute parallel for num_teams (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumerat ion type, not 'char *'}} #pragma omp target teams distribute parallel for num_teams (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumerat ion type, not 'char *'}}
for (int i=0; i<100; i++) foo(); for (int i=0; i<100; i++) foo();
#pragma omp target teams distribute parallel for num_teams (argc + argc) #pragma omp target teams distribute parallel for num_teams (argc + z)
for (int i=0; i<100; i++) foo(); for (int i=0; i<100; i++) foo();
#pragma omp target teams distribute parallel for num_teams (argc), num_teams (ar gc+1) // expected-error {{directive '#pragma omp target teams distribute paralle l for' cannot contain more than one 'num_teams' clause}} #pragma omp target teams distribute parallel for num_teams (argc), num_teams (ar gc+1) // expected-error {{directive '#pragma omp target teams distribute paralle l for' cannot contain more than one 'num_teams' clause}}
for (int i=0; i<100; i++) foo(); for (int i=0; i<100; i++) foo();
#pragma omp target teams distribute parallel for num_teams (S1) // expected-erro r {{'S1' does not refer to a value}} #pragma omp target teams distribute parallel for num_teams (S1) // expected-erro r {{'S1' does not refer to a value}}
for (int i=0; i<100; i++) foo(); for (int i=0; i<100; i++) foo();
#pragma omp target teams distribute parallel for num_teams (-2) // expected-erro r {{argument to 'num_teams' clause must be a strictly positive integer value}} #pragma omp target teams distribute parallel for num_teams (-2) // expected-erro r {{argument to 'num_teams' clause must be a strictly positive integer value}}
for (int i=0; i<100; i++) foo(); for (int i=0; i<100; i++) foo();
 End of changes. 6 change blocks. 
4 lines changed or deleted 6 lines changed or added

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