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
147 lines
6.9 KiB
C++
147 lines
6.9 KiB
C++
// RUN: %clang_cc1 -verify=expected,omp45 -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
|
|
// RUN: %clang_cc1 -verify=expected,omp51 -fopenmp -ferror-limit 100 %s -Wuninitialized
|
|
|
|
// RUN: %clang_cc1 -verify=expected,omp45 -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
|
|
// RUN: %clang_cc1 -verify=expected,omp51 -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
|
|
|
|
struct S1 { // expected-note 2 {{declared here}}
|
|
int a;
|
|
};
|
|
|
|
template <class T>
|
|
T tmain(T argc) {
|
|
#pragma omp flush allocate(argc) // expected-error {{unexpected OpenMP clause 'allocate' in directive '#pragma omp flush'}}
|
|
;
|
|
#pragma omp flush untied // expected-error {{unexpected OpenMP clause 'untied' in directive '#pragma omp flush'}}
|
|
#pragma omp flush unknown // expected-warning {{extra tokens at the end of '#pragma omp flush' are ignored}}
|
|
if (argc)
|
|
#pragma omp flush // expected-error {{'#pragma omp flush' cannot be an immediate substatement}}
|
|
if (argc) {
|
|
#pragma omp flush
|
|
}
|
|
while (argc)
|
|
#pragma omp flush // expected-error {{'#pragma omp flush' cannot be an immediate substatement}}
|
|
while (argc) {
|
|
#pragma omp flush
|
|
}
|
|
do
|
|
#pragma omp flush // expected-error {{'#pragma omp flush' cannot be an immediate substatement}}
|
|
while (argc)
|
|
;
|
|
do {
|
|
#pragma omp flush
|
|
} while (argc);
|
|
switch (argc)
|
|
#pragma omp flush // expected-error {{'#pragma omp flush' cannot be an immediate substatement}}
|
|
switch (argc)
|
|
case 1:
|
|
#pragma omp flush // expected-error {{'#pragma omp flush' cannot be an immediate substatement}}
|
|
switch (argc)
|
|
case 1: {
|
|
#pragma omp flush
|
|
}
|
|
switch (argc) {
|
|
#pragma omp flush
|
|
case 1:
|
|
#pragma omp flush // expected-error {{'#pragma omp flush' cannot be an immediate substatement}}
|
|
break;
|
|
default: {
|
|
#pragma omp flush
|
|
} break;
|
|
}
|
|
for (;;)
|
|
#pragma omp flush // expected-error {{'#pragma omp flush' cannot be an immediate substatement}}
|
|
for (;;) {
|
|
#pragma omp flush
|
|
}
|
|
label:
|
|
#pragma omp flush // expected-error {{'#pragma omp flush' cannot be an immediate substatement}}
|
|
label1 : {
|
|
#pragma omp flush
|
|
}
|
|
|
|
#pragma omp flush
|
|
#pragma omp flush( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
|
|
#pragma omp flush() // expected-error {{expected expression}}
|
|
#pragma omp flush(argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
|
|
#pragma omp flush(argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
|
|
#pragma omp flush(argc)
|
|
#pragma omp flush(S1) // expected-error {{'S1' does not refer to a value}}
|
|
#pragma omp flush(argc) flush(argc) // expected-warning {{extra tokens at the end of '#pragma omp flush' are ignored}}
|
|
#pragma omp parallel flush(argc) // expected-warning {{extra tokens at the end of '#pragma omp parallel' are ignored}}
|
|
;
|
|
return T();
|
|
}
|
|
|
|
int main(int argc, char **argv) {
|
|
#pragma omp flush
|
|
;
|
|
#pragma omp flush untied // expected-error {{unexpected OpenMP clause 'untied' in directive '#pragma omp flush'}}
|
|
#pragma omp flush unknown // expected-warning {{extra tokens at the end of '#pragma omp flush' are ignored}}
|
|
if (argc)
|
|
#pragma omp flush // expected-error {{'#pragma omp flush' cannot be an immediate substatement}}
|
|
if (argc) {
|
|
#pragma omp flush
|
|
}
|
|
while (argc)
|
|
#pragma omp flush // expected-error {{'#pragma omp flush' cannot be an immediate substatement}}
|
|
while (argc) {
|
|
#pragma omp flush
|
|
}
|
|
do
|
|
#pragma omp flush // expected-error {{'#pragma omp flush' cannot be an immediate substatement}}
|
|
while (argc)
|
|
;
|
|
do {
|
|
#pragma omp flush
|
|
} while (argc);
|
|
switch (argc)
|
|
#pragma omp flush // expected-error {{'#pragma omp flush' cannot be an immediate substatement}}
|
|
switch (argc)
|
|
case 1:
|
|
#pragma omp flush // expected-error {{'#pragma omp flush' cannot be an immediate substatement}}
|
|
switch (argc)
|
|
case 1: {
|
|
#pragma omp flush
|
|
}
|
|
switch (argc) {
|
|
#pragma omp flush
|
|
case 1:
|
|
#pragma omp flush // expected-error {{'#pragma omp flush' cannot be an immediate substatement}}
|
|
break;
|
|
default: {
|
|
#pragma omp flush
|
|
} break;
|
|
}
|
|
for (;;)
|
|
#pragma omp flush // expected-error {{'#pragma omp flush' cannot be an immediate substatement}}
|
|
for (;;) {
|
|
#pragma omp flush
|
|
}
|
|
label:
|
|
#pragma omp flush // expected-error {{'#pragma omp flush' cannot be an immediate substatement}}
|
|
label1 : {
|
|
#pragma omp flush
|
|
}
|
|
|
|
#pragma omp flush
|
|
#pragma omp flush( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
|
|
#pragma omp flush() // expected-error {{expected expression}}
|
|
#pragma omp flush(argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
|
|
#pragma omp flush(argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
|
|
#pragma omp flush(argc)
|
|
#pragma omp flush(S1) // expected-error {{'S1' does not refer to a value}}
|
|
#pragma omp flush(argc) flush(argc) // expected-warning {{extra tokens at the end of '#pragma omp flush' are ignored}}
|
|
#pragma omp parallel flush(argc) // expected-warning {{extra tokens at the end of '#pragma omp parallel' are ignored}}
|
|
;
|
|
#pragma omp flush acq_rel // omp45-error {{unexpected OpenMP clause 'acq_rel' in directive '#pragma omp flush'}}
|
|
#pragma omp flush acquire // omp45-error {{unexpected OpenMP clause 'acquire' in directive '#pragma omp flush'}}
|
|
#pragma omp flush release // omp45-error {{unexpected OpenMP clause 'release' in directive '#pragma omp flush'}}
|
|
#pragma omp flush relaxed // expected-error {{unexpected OpenMP clause 'relaxed' in directive '#pragma omp flush'}}
|
|
#pragma omp flush acq_rel acquire // omp45-error {{unexpected OpenMP clause 'acq_rel' in directive '#pragma omp flush'}} omp45-error {{unexpected OpenMP clause 'acquire' in directive '#pragma omp flush'}} omp51-error {{directive '#pragma omp flush' cannot contain more than one 'seq_cst', 'acq_rel', 'acquire' or 'release' clause}} omp51-note {{'acq_rel' clause used here}}
|
|
#pragma omp flush release acquire // omp45-error {{unexpected OpenMP clause 'release' in directive '#pragma omp flush'}} omp45-error {{unexpected OpenMP clause 'acquire' in directive '#pragma omp flush'}} omp51-error {{directive '#pragma omp flush' cannot contain more than one 'seq_cst', 'acq_rel', 'acquire' or 'release' clause}} omp51-note {{'release' clause used here}}
|
|
#pragma omp flush acq_rel (argc) // omp45-error {{unexpected OpenMP clause 'acq_rel' in directive '#pragma omp flush'}} expected-warning {{extra tokens at the end of '#pragma omp flush' are ignored}}
|
|
#pragma omp flush(argc) acq_rel // omp45-error {{unexpected OpenMP clause 'acq_rel' in directive '#pragma omp flush'}} omp51-error {{'flush' directive with memory order clause 'acq_rel' cannot have the list}} omp51-note {{memory order clause 'acq_rel' is specified here}}
|
|
return tmain(argc);
|
|
}
|