https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122253

Nathaniel Shead <nshead at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
           Assignee|unassigned at gcc dot gnu.org      |nshead at gcc dot 
gnu.org

--- Comment #7 from Nathaniel Shead <nshead at gcc dot gnu.org> ---
On trunk, with the following patch to https://github.com/GSI-HPC/simd/ the
testcase in comment #0 compiles successfully.  (There might be other TU-local
entities that weren't exposed, I haven't done a thorough scan.)  So I think
this is fixed.

diff --git a/bits/detail.h b/bits/detail.h
index 01c66dd..2b38675 100644
--- a/bits/detail.h
+++ b/bits/detail.h
@@ -54,7 +54,7 @@ namespace std::__detail
     using _SanitizedBitMask = _BitMask<_Np, true>;

   template <std::integral _Tp, typename _Fp>
-    _GLIBCXX_SIMD_INTRINSIC static void
+    _GLIBCXX_SIMD_INTRINSIC void
     _S_bit_iteration(_Tp __mask, _Fp&& __f)
     {
       static_assert(sizeof(0ULL) >= sizeof(_Tp));
@@ -67,7 +67,7 @@ namespace std::__detail
     }

   template <size_t _Np, bool _Sanitized, typename _Fp>
-    _GLIBCXX_SIMD_INTRINSIC static void
+    _GLIBCXX_SIMD_INTRINSIC void
     _S_bit_iteration(_BitMask<_Np, _Sanitized> __mask, _Fp&& __f)
     { _S_bit_iteration(__mask._M_sanitized()._M_to_bits(), __f); }

diff --git a/bits/fwddecl.h b/bits/fwddecl.h
index dd37660..3a8ee1f 100644
--- a/bits/fwddecl.h
+++ b/bits/fwddecl.h
@@ -534,8 +534,8 @@ namespace std::datapar
     constexpr rebind_t<make_signed_t<typename _Vp::value_type>, _Vp>
     popcount(const _Vp& __v) noexcept;

-  constexpr int zero_element = -1 << (sizeof(int) * __CHAR_BIT__ - 1);
-  constexpr int uninit_element = zero_element + 1;
+  inline constexpr int zero_element = -1 << (sizeof(int) * __CHAR_BIT__ - 1);
+  inline constexpr int uninit_element = zero_element + 1;
 }

 namespace std

Reply via email to