https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97846
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Marek Polacek <mpola...@gcc.gnu.org>: https://gcc.gnu.org/g:6f20c42cc162ac3725584547ab4933bae4c78665 commit r11-5233-g6f20c42cc162ac3725584547ab4933bae4c78665 Author: Marek Polacek <pola...@redhat.com> Date: Mon Nov 16 19:59:35 2020 -0500 c++: Reject identifier label in constexpr [PR97846] [dcl.constexpr]/3 says that the function-body of a constexpr function shall not contain an identifier label, but we aren't enforcing that. This patch implements that. Of course, we can't reject artificial labels. gcc/cp/ChangeLog: PR c++/97846 * constexpr.c (potential_constant_expression_1): Reject LABEL_EXPRs that use non-artifical LABEL_DECLs. gcc/testsuite/ChangeLog: PR c++/97846 * g++.dg/cpp1y/constexpr-label.C: New test.