From f3952848c47f9024f493491200a7ce62fc10bb99 Mon Sep 17 00:00:00 2001 From: Allison Piper Date: Fri, 5 Apr 2024 19:25:22 +0000 Subject: [PATCH] WAR issues on gcc-7. --- testing/enum_type_list.cu | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/testing/enum_type_list.cu b/testing/enum_type_list.cu index 05b2605..88535ba 100644 --- a/testing/enum_type_list.cu +++ b/testing/enum_type_list.cu @@ -24,6 +24,11 @@ #include +// If using gcc version < 7, disable some tests to WAR a compiler bug. See NVIDIA/nvbench#39. +#if defined(__GNUC__) && __GNUC__ == 7 +#define USING_GCC_7 +#endif + enum class scoped_enum { val_1, @@ -109,9 +114,11 @@ void test_int() void test_scoped_enum() { +#ifndef USING_GCC_7 ASSERT(( std::is_same_v, nvbench::type_list>>)); +#endif ASSERT(( std::is_same_v, nvbench::type_list>>)); @@ -132,6 +140,7 @@ void test_unscoped_enum() nvbench::type_list, nvbench::enum_type, nvbench::enum_type>>)); +#endif } void test_scoped_enum_type_strings()