From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1314A383E809; Sun, 17 May 2020 14:26:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1314A383E809 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1589725580; bh=Y/mYUeSYkRaSZVfiAOTNAp9qF6DRTdXdOT/Hn3jSbFM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=irtcZ5yRkf+VSViHTL0KIkukilLjx2ocLfCinUMSHsVJMNA/8LUXy/N/LxRXeBEQb SsL8LbP82htGlW+SoDMcNRVcI6YfoBDnS4XoDCRsWO9qgIHpMQbZd8AvJXxD9UYwi7 uDMTX5Lst6nk6SmJLxtqjpbcdGwtZdsgtly3cZUE= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug d/94970] d: internal compiler error: in verify_gimple_stmt, at tree-cfg.c:4959 Date: Sun, 17 May 2020 14:26:19 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: d X-Bugzilla-Version: 10.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: ibuclaw at gdcproject dot 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 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: Sun, 17 May 2020 14:26:20 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94970 --- Comment #6 from CVS Commits --- The releases/gcc-10 branch has been updated by Iain Buclaw : https://gcc.gnu.org/g:79f2ae6ecffbef5c1f78459f6980e0f91121022d commit r10-8149-g79f2ae6ecffbef5c1f78459f6980e0f91121022d Author: Iain Buclaw Date: Sun May 17 16:25:35 2020 +0200 d: Fix ICE in verify_gimple_stmt, at tree-cfg.c:4959 Both array concat and array new expressions wrapped any temporaries created into a BIND_EXPR. This does not work if an expression used to construct the result requires scope destruction, which is represented by a TARGET_EXPR with a clean-up, and a CLEANUP_POINT_EXPR at the location where the temporaries logically go out of scope. The reason for this not working is because the lowering of cleanup point expressions does not traverse inside BIND_EXPRs to expand any gimple cleanup expressions within. The use of creating BIND_EXPR has been removed at both locations, and replaced with a normal temporary variable that has initialization delayed until its address is taken. gcc/d/ChangeLog: PR d/94970 * d-codegen.cc (force_target_expr): Move create_temporary_var implementation inline here. (create_temporary_var): Remove. (maybe_temporary_var): Remove. (bind_expr): Remove. * d-convert.cc (d_array_convert): Use build_local_temp to gener= ate temporaries, and generate its assignment. * d-tree.h (create_temporary_var): Remove. (maybe_temporary_var): Remove. (d_array_convert): Remove vars argument. * expr.cc (ExprVisitor::visit (CatExp *)): Use build_local_temp= to generate temporaries, don't wrap them in a BIND_EXPR. (ExprVisitor::visit (NewExp *)): Likewise. gcc/testsuite/ChangeLog: PR d/94970 * gdc.dg/pr94970.d: New test.=