Files
derek.holloway 7502bf64a4
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
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

88 lines
1.9 KiB
C++

// RUN: %clang_cc1 %s -verify -fopenacc
template<unsigned I, typename T>
void templ() {
#pragma acc loop collapse(I)
for(int i = 0; i < 5;++i)
for(int j = 0; j < 5; ++j)
for(int k = 0; k < 5; ++k)
for(int l = 0; l < 5; ++l)
for(int m = 0; m < 5; ++m)
for(int n = 0; n < 5; ++n)
for(int o = 0; o < 5; ++o);
#pragma acc loop collapse(T::value)
for(int i = 0;i < 5;++i)
for(int j = 0; j < 5; ++j)
for(int k = 0; k < 5; ++k)
for(int l = 0; l < 5; ++l)
for(int m = 0; m < 5;++m)
for(;;)
for(;;);
#pragma acc parallel vector_length(T::value)
for(;;){}
#pragma acc parallel vector_length(I)
for(;;){}
#pragma acc parallel async(T::value)
for(;;){}
#pragma acc parallel async(I)
for(;;){}
#pragma acc parallel async
for(;;){}
T t;
#pragma acc exit data delete(t)
;
}
struct S {
static constexpr unsigned value = 5;
};
void use() {
templ<7, S>();
}
// expected-error@+2{{expected ')'}}
// expected-note@+1{{to match this '('}}
#pragma acc routine(use) seq bind(NS::NSFunc)
// expected-error@+1{{string literal with user-defined suffix cannot be used here}}
#pragma acc routine(use) seq bind("unknown udl"_UDL)
// expected-warning@+1{{encoding prefix 'u' on an unevaluated string literal has no effect}}
#pragma acc routine(use) seq bind(u"16 bits")
void another_func();
// expected-warning@+1{{encoding prefix 'U' on an unevaluated string literal has no effect}}
#pragma acc routine(another_func) seq bind(U"32 bits")
void AtomicIf() {
int i, j;
// expected-error@+1{{expected '('}}
#pragma acc atomic read if
i = j;
#pragma acc atomic read if (true)
i = j;
#pragma acc atomic write if (false)
i = j + 1;
#pragma acc atomic update if (i)
++i;
#pragma acc atomic if (j)
++i;
#pragma acc atomic capture if (true)
i = j++;
#pragma acc atomic capture if (i)
{
++j;
i = j;
}
}