From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A4BAD385840F; Thu, 23 Mar 2023 10:02:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A4BAD385840F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1679565751; bh=GXMzynNU1uLdkDJ9b+LaYvPjFYgUOVqyS9fzoXKxLlQ=; h=From:To:Subject:Date:From; b=qRszI3aC+YHKzzVKvzL6GphGBquqP+1SjfryC+msJkl+6kP7WdyUTbhYnqziPhHVn Z5ukPbsS1qvQIL8q78oLbNxRORrcnZDhnXsFgFf1Hy6+CynU5fDrA343mi6/6L6v0V zAez88djxbQmaDOeeFXQDUTXF8E+xWwAB8u2WJJI= From: "mkretz at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/109261] New: std::experimental::simd is not usable in several constant expressions Date: Thu, 23 Mar 2023 10:02:31 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mkretz at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: mkretz at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109261 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=3Dgnu++17. But it fails for many valid cases. Testcase (https://godbolt.org/z/sjrfMM89h): #include #include using V =3D std::experimental::simd; using V12 =3D std::experimental::fixed_size_simd; constexpr std::array data =3D {}; constexpr auto a =3D V12(data.data(), std::experimental::element_aligned); constexpr auto b =3D []() constexpr { V12 x =3D 1; where(x > 0, x) =3D 0; return x; }(); constexpr auto c =3D V()[0]; constexpr auto d =3D !V() && !!V();=