From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D1768384F032; Fri, 31 May 2024 10:59:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D1768384F032 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1717153182; bh=S6rg3K+1dm06U94fsmuvE652zSdOibydwLGputQeZmk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=vozkE6GEgZ296BwdMrDwHYGH3W+HWaQAqO+f4JyferjZRtd+9404xhaH7T4kCa/3/ nzZ3H4KM+ieXem3gJGuLjgsMa9TmEHryvWoUL/mGFbI/ao7FbFGQvi1v3n3sNYDnOW VDBS3vpfYwdHkBJrlTIP1vuh7qlID6Jfo+27u0Jw= From: "aoliva at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/114803] simd conversion to [[gnu::vector_size(N)]] type hits invalid code in experimental/bits/simd_builtin.h Date: Fri, 31 May 2024 10:59:41 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: aoliva at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED 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: Message-ID: In-Reply-To: References: 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=3D114803 --- Comment #10 from Alexandre Oliva --- FWIW, I can trigger the problem on arm-eabi (and presumably also on aarch64-elf, but I haven't tried that) with -D__clang__. (our vxworks toolchains have to define that macro, for complicated reasons) here's a reduced testcase: arm-eabi-g++ ~/pr114803.cc -mfpu=3Dneon -mfloat-abi=3Dhard -O0 -std=3Dgnu++= 17 -D__clang__ [-funsigned-char] include template void test() { using V =3D std::experimental::simd >; if constexpr (std::is_signed_v) static_cast(V{}); else static_cast(V{}); } int main() { test(); } pr114803.cc: In instantiation of =E2=80=98void test() [with T =3D char]=E2= =80=99: pr114803.cc:16: required from here pr114803.cc:11: error: invalid =E2=80=98static_cast=E2=80=99 from type =E2=80=98std::experimental::parallelism_v2::simd >=E2=80=99 to = type =E2=80=98uint8x16_t=E2=80=99=