From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CBE9E3856973; Sat, 22 Apr 2023 00:23:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CBE9E3856973 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1682122989; bh=SptPmRiVoYlyVp7DbL4Ycioh8GYCDRgzwcjKueToii8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Z3Yxiu1DPyXjl2pAQO0qeJEYjq+DkCbvd0a2cmHe+MADpSKf8+P639bee6RyDVB+n UI/7UxtoSoUc7siHk3oJVXQObGLKFtyTPlntNku6tJxXDNfEi8NyGyRcoCFwxq0lTV kf1/Z8cgCtV1gq5wyKcGFeWfUPUuIIxl4Njpt2wQ= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/105996] [10/11 Regression] reinterpret_cast in constexpr failure creating a pair with a function pointer of class parent Date: Sat, 22 Apr 2023 00:23:09 +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: 12.1.0 X-Bugzilla-Keywords: rejects-valid 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: 10.5 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=3D105996 --- Comment #8 from CVS Commits --- The releases/gcc-11 branch has been updated by Jason Merrill : https://gcc.gnu.org/g:b6c8048cdd2c1e523f663f248ba39caed5af90e7 commit r11-10646-gb6c8048cdd2c1e523f663f248ba39caed5af90e7 Author: Jason Merrill Date: Thu Mar 23 16:50:09 2023 -0400 c++: constexpr PMF conversion [PR105996] Here, we were calling build_reinterpret_cast regardless of whether there was actually a cast, and that now sets REINTERPRET_CAST_P. But that optimization seems dodgy anyway, as it involves NOP_EXPR from one RECORD_TYPE to another and we try to reserve NOP_EXPR for fundamental types. And the generated code seems the same, so let's drop it. And also strip location wrappers. PR c++/105996 gcc/cp/ChangeLog: * typeck.c (build_ptrmemfunc): Drop 0-offset optimization and location wrappers. gcc/testsuite/ChangeLog: * g++.dg/cpp0x/constexpr-pmf3.C: New test.=