public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/109261] New: std::experimental::simd is not usable in several constant expressions
@ 2023-03-23 10:02 mkretz at gcc dot gnu.org
  2023-03-23 10:02 ` [Bug libstdc++/109261] " mkretz at gcc dot gnu.org
                   ` (20 more replies)
  0 siblings, 21 replies; 22+ messages in thread
From: mkretz at gcc dot gnu.org @ 2023-03-23 10:02 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 109261
           Summary: std::experimental::simd is not usable in several
                    constant expressions
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: mkretz at gcc dot gnu.org
          Reporter: mkretz at gcc dot gnu.org
  Target Milestone: ---

std::experimental::simd wants to work in constant expressions with
-std=gnu++17. But it fails for many valid cases.

Testcase (https://godbolt.org/z/sjrfMM89h):

#include <experimental/simd>
#include <array>

using V = std::experimental::simd<int>;
using V12 = std::experimental::fixed_size_simd<int, 12>;

constexpr std::array<int, V12::size()> data = {};
constexpr auto a = V12(data.data(), std::experimental::element_aligned);

constexpr auto b = []() constexpr {
    V12 x = 1;
    where(x > 0, x) = 0;
    return x;
}();

constexpr auto c = V()[0];

constexpr auto d = !V() && !!V();

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2023-05-25  7:07 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-23 10:02 [Bug libstdc++/109261] New: std::experimental::simd is not usable in several constant expressions mkretz at gcc dot gnu.org
2023-03-23 10:02 ` [Bug libstdc++/109261] " mkretz at gcc dot gnu.org
2023-04-26  6:58 ` rguenth at gcc dot gnu.org
2023-05-23  7:27 ` cvs-commit at gcc dot gnu.org
2023-05-23 10:03 ` cvs-commit at gcc dot gnu.org
2023-05-23 15:14 ` clyon at gcc dot gnu.org
2023-05-23 15:37 ` mkretz at gcc dot gnu.org
2023-05-23 16:19 ` clyon at gcc dot gnu.org
2023-05-23 22:08 ` mkretz at gcc dot gnu.org
2023-05-24  8:28 ` clyon at gcc dot gnu.org
2023-05-24 11:06 ` cvs-commit at gcc dot gnu.org
2023-05-24 11:06 ` cvs-commit at gcc dot gnu.org
2023-05-24 12:31 ` clyon at gcc dot gnu.org
2023-05-24 19:41 ` cvs-commit at gcc dot gnu.org
2023-05-24 19:41 ` cvs-commit at gcc dot gnu.org
2023-05-25  7:03 ` cvs-commit at gcc dot gnu.org
2023-05-25  7:03 ` cvs-commit at gcc dot gnu.org
2023-05-25  7:04 ` cvs-commit at gcc dot gnu.org
2023-05-25  7:05 ` cvs-commit at gcc dot gnu.org
2023-05-25  7:05 ` cvs-commit at gcc dot gnu.org
2023-05-25  7:05 ` cvs-commit at gcc dot gnu.org
2023-05-25  7:07 ` mkretz at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).