From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D46563858D20; Sat, 15 Apr 2023 16:35:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D46563858D20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1681576526; bh=tZ24CCC7wJg8Qxub9xJZgZ+Swswy4Ervy470AELqQl4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=GRJHC4HBKU2aAtvI90y3FH7HJvwRcEqo+1hhuqS94QWtqTlM+ykTevLP1ktXKR9N/ Ll6gujcPqz8Xglv00uxrKJWuuTs9pAlJI51oJVwsCqyU87iyBP8BEM+lJ/7WMZKgDf ovDoToXwKKJIHCb+YaE177FyDfOX4NfsYQryqGKc= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/109357] [12/13 Regression] internal compiler error in cp/constexpr.cc:1685 Date: Sat, 15 Apr 2023 16:35:25 +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: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: jason at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.3 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=3D109357 --- Comment #2 from CVS Commits --- The trunk branch has been updated by Jason Merrill : https://gcc.gnu.org/g:13669741e673fa6a7b7c8d68f992e58ecd393160 commit r13-7193-g13669741e673fa6a7b7c8d68f992e58ecd393160 Author: Jason Merrill Date: Fri Apr 14 22:40:43 2023 -0400 c++: constexpr aggregate destruction [PR109357] We were assuming that the result of evaluation of TARGET_EXPR_INITIAL w= ould always be the new value of the temporary, but that's not necessarily tr= ue when the initializer is complex (i.e. target_expr_needs_replace). In t= hat case evaluating the initializer initializes the temporary as a side-eff= ect. PR c++/109357 gcc/cp/ChangeLog: * constexpr.cc (cxx_eval_constant_expression) [TARGET_EXPR]: Check for complex initializer. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/constexpr-dtor15.C: New test.=