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
63 lines
2.5 KiB
C++
63 lines
2.5 KiB
C++
// RUN: %clang_cc1 -verify -std=gnu++11 %s
|
|
// RUN: %clang_cc1 -verify -std=c++11 %s
|
|
// RUN: %clang_cc1 -triple powerpc64-linux -verify -std=c++11 %s
|
|
// RUN: %clang_cc1 -triple powerpc64-ibm-aix -target-feature +float128 -verify -std=c++11 %s
|
|
// RUN: %clang_cc1 -triple i686-windows-gnu -verify -std=c++11 %s
|
|
// RUN: %clang_cc1 -triple x86_64-windows-gnu -verify -std=c++11 %s
|
|
// RUN: %clang_cc1 -triple x86_64-windows-msvc -verify -std=c++11 %s
|
|
|
|
#if defined(__FLOAT128__) || defined(__SIZEOF_FLOAT128__)
|
|
|
|
#if defined(__powerpc__)
|
|
template <typename> struct __is_float128 { static constexpr bool value = false; };
|
|
template <> struct __is_float128<__float128> { static constexpr bool value = true; };
|
|
static_assert(__is_float128<__ieee128>::value, "__ieee128 aliases to __float128");
|
|
#endif
|
|
|
|
__float128 f;
|
|
template<typename> struct __is_floating_point_helper {};
|
|
template<> struct __is_floating_point_helper<__float128> {};
|
|
int g(int x, __float128 *y) {
|
|
return x + *y;
|
|
}
|
|
|
|
// expected-no-error {{__float128 is not supported on this target}}
|
|
#else
|
|
#if !defined(__STRICT_ANSI__)
|
|
__float128 f; // expected-error {{__float128 is not supported on this target}}
|
|
// But this should work:
|
|
template<typename> struct __is_floating_point_helper {};
|
|
template<> struct __is_floating_point_helper<__float128> {}; // expected-error {{__float128 is not supported on this target}}
|
|
|
|
// FIXME: This could have a better diag.
|
|
int g(int x, __float128 *y) { // expected-error {{__float128 is not supported on this target}}
|
|
return x + *y;
|
|
}
|
|
|
|
#else
|
|
__float128 f; // expected-error {{__float128 is not supported on this target}}
|
|
template<typename> struct __is_floating_point_helper {};
|
|
template<> struct __is_floating_point_helper<__float128> {}; // expected-error {{__float128 is not supported on this target}}
|
|
|
|
int g(int x, __float128 *y) { // expected-error {{__float128 is not supported on this target}}
|
|
return x + *y;
|
|
}
|
|
|
|
#endif
|
|
#endif
|
|
|
|
#ifdef __powerpc__
|
|
__ibm128 i;
|
|
template <> struct __is_floating_point_helper<__ibm128> {};
|
|
int w(int x, __ibm128 *y) {
|
|
return x + *y;
|
|
}
|
|
// expected-no-error {{__ibm128 is not supported on this target}}
|
|
#else
|
|
__ibm128 i; // expected-error {{__ibm128 is not supported on this target}}
|
|
template <> struct __is_floating_point_helper<__ibm128> {}; // expected-error {{__ibm128 is not supported on this target}}
|
|
int w(int x, __ibm128 *y) { // expected-error {{__ibm128 is not supported on this target}}
|
|
return x + *y;
|
|
}
|
|
#endif
|