From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E2DC0393741D; Wed, 11 Mar 2020 07:00:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E2DC0393741D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1583910036; bh=A7S8Y9ioauqS8PHTFiMh3sONphgceiQuLtKeLF5FTLc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=NYWxk/naRylNlCFouFQElPUPFC2sQ4HhCvhW1DQm7f/6yH/2RVZh88qwSVMqID13n hdHQYy+2XEn7J5DElmEBtsg3IqBYeZ12ZMuwmUi4IjsXkXhOL95qGgyLeAkEHvwTbW r+/biubKWBtCbz5Q8CsqJQSedMaI3azZLPG/5J1I= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/52320] missing destructor call after thrown exception in initializer Date: Wed, 11 Mar 2020 07:00:36 +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: 4.5.3 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jason at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.0 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Mar 2020 07:00:37 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D52320 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #8 from Jakub Jelinek --- commit r10-7110-g14af5d9b19b0f4ee1d929e505e245ae5c2f6bdc6 Author: Jason Merrill Date: Tue Mar 10 16:05:18 2020 -0400 c++: Partially revert patch for PR66139. The patch for 66139 exposed a long-standing bug with split_nonconstant_init (since 4.7, apparently): initializion of individ= ual elements of an aggregate are not a full-expressions, but split_nonconstant_init was making full-expressions out of them. My fix= for 66139 extended the use of split_nonconstant_init, and thus the bug, to aggregate initialization of temporaries within an expression, in which context (PR94041) the bug is more noticeable. PR93922 is a problem wit= h my implementation strategy of splitting out at gimplification time, introducing function calls that weren't in the GENERIC. So I'm going to revert the patch now and try again for GCC 11. gcc/cp/ChangeLog 2020-03-10 Jason Merrill PR c++/93922 PR c++/94041 PR c++/52320 PR c++/66139 * cp-gimplify.c (cp_gimplify_init_expr): Partially revert patch= for 66139: Don't split_nonconstant_init. Remove pre_p parameter.=