From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id ECDED3858D37; Sat, 21 Jan 2023 06:50:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ECDED3858D37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1674283813; bh=fc8tsHArzGwu8Sjc+3qtR6BmHS0aWLq8sNUEhGwIIlM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=K+/NVHRaeJtaWsvDSIDX42SCgt0wTstwjh3ILeuWOEbOQ/uQoLShkqsQT+wu6oRGL qq1Z6tXyT4dUg1YPrf+GcerJvcRpT9FiX/svFZRVpQZ9pKS+3oBGbTEBxsK28VlvUZ lM48wMeb0jVIQt+d851HXGdJoGrzAcl2TCQBS9QQ= From: "davidledger at live dot com.au" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/104177] coroutine frame is not being allocated with the correct alignment Date: Sat, 21 Jan 2023 06:50:12 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 11.1.1 X-Bugzilla-Keywords: C++-coroutines, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: davidledger at live dot com.au X-Bugzilla-Status: NEW 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: cc 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=3D104177 David Ledger changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |davidledger at live dot co= m.au --- Comment #15 from David Ledger --- This is a complete minimum reproduction, just to aid Iain Sandoe: ```CPP #include using namespace std; #include static char buffer[4]; template struct b { struct promise_type { void *operator new(size_t) { return &buffer[3]; } void get_return_object(); void unhandled_exception(); suspend_always initial_suspend(); suspend_always final_suspend() noexcept; suspend_always yield_value(a); }; }; b c() { max_align_t buffer[1]; for (auto d : buffer) co_yield &d; } ```=