From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9EF753858CD1; Thu, 21 Mar 2024 18:01:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9EF753858CD1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1711044094; bh=rSFy2ck5qF4knyBw+5tWVLqZ2vZhB704uSYqs6pJjng=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Wq1bKNQK066XKY4Sx/5w2A1b6L/5hwBMW9pEbIV6ZAqg2797z37DTgU4vgO4e/8J4 1HAZu1mVOKR/UkFN2ZO4tFC9vAaVkYzhA6AkEIn6s4P+Y+3rXC719GL3TgJExTV1Fk tm1m5iUB+Cih2ujSiJExvji56bbaA6D5ewCxIWC8= From: "lee.imple at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/114417] std::experimental::simd is not a POD (by ABI definitions) and is always passed by reference instead of by value Date: Thu, 21 Mar 2024 18:01:34 +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: unknown X-Bugzilla-Keywords: ABI X-Bugzilla-Severity: enhancement X-Bugzilla-Who: lee.imple at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned 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=3D114417 --- Comment #7 from Imple Lee --- I tried to dig into the source code and it seems like it was designed to be "passed via the stack". Not sure whether this was specified by the specification (did not find relevant requirements, but I am not quite famil= iar with that) or just an implementation choice. In GCC git tree [libstdc++-v3/include/experimental/bits/simd_fixed_size.h, = line 27](https://gcc.gnu.org/git?p=3Dgcc.git;a=3Dblob;f=3Dlibstdc%2B%2B-v3/inclu= de/experimental/bits/simd_fixed_size.h;h=3D408855212979cc32699db0805079ac74= f495a8fa;hb=3DHEAD#l27): ... * The fixed_size ABI gives the following guarantees: * - simd objects are passed via the stack ...=