From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DFC1E3858C50; Fri, 28 Apr 2023 14:21:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DFC1E3858C50 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1682691715; bh=iGif9kOxFAXYgQ6ZQUhRPSmgx6eaBOKUoZBxFsVMBws=; h=From:To:Subject:Date:In-Reply-To:References:From; b=bh0iq0fbfPgTW8NHqK3Nzs8tPWABVtN9JGEDa6L17f6wBVZYZtEvrf2BgQmPmyvrm EPz9EfH0rZwEJ0tPoG0NZMTrFjHfw+bVluXgWoSnsZS7dr9wURBtCHVAO8XLGtW5LM 7rRBNtSDIhBQOoohi6qOMNm7N64Qa4nanuRL+Z2w= From: "mpolacek at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/109666] [13/14 Regression] Segmentation fault with std::array using gcc 13 Date: Fri, 28 Apr 2023 14:21:55 +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: 13.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: mpolacek at gcc dot gnu.org 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: 13.2 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=3D109666 Marek Polacek changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mpolacek at gcc dot gnu.org --- Comment #3 from Marek Polacek --- Another test: #include template struct Point { private: T value_[n]{}; }; struct Edge { Point start{}; Point end{}; }; template class StaticVector { public: static StaticVector create() { StaticVector output; return output; } private: std::array data{}; }; class Polygon { public: using Edges =3D StaticVector; Edges edges() const { auto edges =3D Edges::create(); return edges; } }; void foo() { Polygon polygon{}; auto const edges =3D polygon.edges(); }=