From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 188FB385DC38; Fri, 24 Nov 2023 16:56:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 188FB385DC38 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1700844983; bh=NqfLnxNuOjxd6QxXoy7J1tOf2HfMLe9wONiVcTuCwpQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ogXBARoReXTe4lTA3BHJGFWWYQp8EXCEV6jAUoQ5wukTmhoPFJIQ8EeECwYZjTY5Z SX1dFFRdtaNv9k9Bjrxn+nBptckIrfnNeSMDChzTgReMj5zrITzvHFxhLSFCzXIYcM kYLQA/KfgUzJ1LtRPIyDmdmk2WXVCM04xy3yrabE= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/107939] [11 Regression] Rejects use of `extern const` variable in a template since r11-557 Date: Fri, 24 Nov 2023 16:56:22 +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: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: mpolacek 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=3D107939 --- Comment #11 from CVS Commits --- The releases/gcc-13 branch has been updated by Patrick Palka : https://gcc.gnu.org/g:cc4cbf38e842cf023e2bdc63a51ef836d7726d8e commit r13-8098-gcc4cbf38e842cf023e2bdc63a51ef836d7726d8e Author: Patrick Palka Date: Thu Nov 16 09:32:07 2023 -0500 c++: constantness of call to function pointer [PR111703] potential_constant_expression for CALL_EXPR tests FUNCTION_POINTER_TYPE= _P on the callee rather than on the type of the callee, which means we always pass want_rval=3Dany when recursing and so may fail to identify a non-constant function pointer callee as such. Fixing this turns out to further work around PR111703. PR c++/111703 PR c++/107939 gcc/cp/ChangeLog: * constexpr.cc (potential_constant_expression_1) : Fix FUNCTION_POINTER_TYPE_P test. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/concepts-fn8.C: Extend test. * g++.dg/diagnostic/constexpr4.C: New test. (cherry picked from commit 0077c0fb19981c108a01cd15af9b2d6d478c183b)=