CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
116 lines
2.5 KiB
C++
116 lines
2.5 KiB
C++
// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
|
|
|
|
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
|
|
|
|
void foo() {
|
|
}
|
|
|
|
bool foobool(int argc) {
|
|
return argc;
|
|
}
|
|
|
|
struct S1; // expected-note {{declared here}}
|
|
class S2 {
|
|
mutable int a;
|
|
|
|
public:
|
|
S2() : a(0) {}
|
|
S2 &operator=(S2 &s2) { return *this; }
|
|
};
|
|
class S3 {
|
|
int a;
|
|
|
|
public:
|
|
S3() : a(0) {}
|
|
S3 &operator=(S3 &s3) { return *this; }
|
|
};
|
|
class S4 {
|
|
int a;
|
|
S4();
|
|
S4 &operator=(const S4 &s4); // expected-note {{implicitly declared private here}}
|
|
|
|
public:
|
|
S4(int v) : a(v) {}
|
|
};
|
|
class S5 {
|
|
int a;
|
|
S5() : a(0) {}
|
|
S5 &operator=(const S5 &s5) { return *this; } // expected-note {{implicitly declared private here}}
|
|
|
|
public:
|
|
S5(int v) : a(v) {}
|
|
};
|
|
template <class T>
|
|
class ST {
|
|
public:
|
|
static T s;
|
|
};
|
|
|
|
S2 k;
|
|
S3 h;
|
|
S4 l(3);
|
|
S5 m(4);
|
|
#pragma omp threadprivate(h, k, l, m)
|
|
|
|
namespace A {
|
|
double x;
|
|
#pragma omp threadprivate(x)
|
|
}
|
|
namespace B {
|
|
using A::x;
|
|
}
|
|
|
|
int main(int argc, char **argv) {
|
|
int i;
|
|
#pragma omp parallel master copyin // expected-error {{expected '(' after 'copyin'}}
|
|
{
|
|
foo();
|
|
}
|
|
#pragma omp parallel master copyin( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
|
|
{
|
|
foo();
|
|
}
|
|
#pragma omp parallel master copyin() // expected-error {{expected expression}}
|
|
{
|
|
foo();
|
|
}
|
|
#pragma omp parallel master copyin(k // expected-error {{expected ')'}} expected-note {{to match this '('}}
|
|
{
|
|
foo();
|
|
}
|
|
#pragma omp parallel master copyin(h, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
|
|
{
|
|
foo();
|
|
}
|
|
#pragma omp parallel master copyin(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
|
|
{
|
|
foo();
|
|
}
|
|
#pragma omp parallel master copyin(l) // expected-error {{'operator=' is a private member of 'S4'}}
|
|
{
|
|
foo();
|
|
}
|
|
#pragma omp parallel master copyin(S1) // expected-error {{'S1' does not refer to a value}}
|
|
{
|
|
foo();
|
|
}
|
|
#pragma omp parallel master copyin(argv[1]) // expected-error {{expected variable name}}
|
|
{
|
|
foo();
|
|
}
|
|
#pragma omp parallel master copyin(i) // expected-error {{copyin variable must be threadprivate}}
|
|
{
|
|
foo();
|
|
}
|
|
#pragma omp parallel master copyin(m) // expected-error {{'operator=' is a private member of 'S5'}}
|
|
{
|
|
foo();
|
|
}
|
|
#pragma omp parallel master copyin(ST < int > ::s, B::x) // expected-error {{copyin variable must be threadprivate}}
|
|
{
|
|
foo();
|
|
}
|
|
|
|
return 0;
|
|
}
|