From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D443E3858C62; Tue, 17 Jan 2023 12:31:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D443E3858C62 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1673958704; bh=wjwf7u/88fRzd2LyqClt7ledlVlJ8PoxPtaWiolxBDU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=MAspgZtf6yiQOAzz8xrlBbv8kg3xFxEm05M4DfGZRK0xpip9nqgS8J8JoNQrMf0ha sncW0QhUruS+9LFXqIsFlTFn4MLtM1dIhy9nMBVeayQHQQItJEiati49Gs+4pLLSeT jyeYJoGLQmmgXBiGRGq9cYltvwYYG9sdoLpeb+TQ= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/105769] [11/12/13 Regression] program segmentation fault with -ftree-vectorize and nested lambdas Date: Tue, 17 Jan 2023 12:31:44 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 11.2.1 X-Bugzilla-Keywords: needs-bisection, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.4 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=3D105769 --- Comment #11 from Jakub Jelinek --- struct S { S *p; S *q; S () {} ~S (); }; void bar (S *); void foo () { S a, b; bar (nullptr); { S c; c.p =3D &a; c.q =3D &b; bar (&c); } bar (nullptr); } at -O2 gets roughly the same stuff in the IL with taking address of a and b being done before a and b is clobbered, then c being clobbered, initialized, eol clobbered and only then a and b destructed and eol clobbered. But for = some reason no stack sharing happens in that case.=