From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 632933857C7C; Fri, 16 Feb 2024 17:30:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 632933857C7C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1708104611; bh=0oxOXpQh1X1YC04wDLPQESDolVb6jvSDo70RRajjBAQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=W5NvBeagQulauqS66XGtu+JazA2hpJtgcgRCnP/9bJgo6lNjPQ6Ei3rcrAQeot8Jv M/8h8zCJDWhdEVfFZGPF5NsENjZ6BLer6om3PErOCdAgCpV4sUGf6CsPBIqyJaAJhC +0whiyCt3SfewExh63aLr5DlX3VKVugEhZJuURDU= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/113545] ICE in label_matches with constexpr function with switch-statement and converted (nonconstant, cast address) input Date: Fri, 16 Feb 2024 17:30: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: 14.0 X-Bugzilla-Keywords: ice-on-valid-code, monitored, patch X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: mpolacek at gcc dot gnu.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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D113545 --- Comment #6 from GCC Commits --- The releases/gcc-13 branch has been updated by Marek Polacek : https://gcc.gnu.org/g:e501a279fb4298c9b23637d573287e059b3b06c8 commit r13-8336-ge501a279fb4298c9b23637d573287e059b3b06c8 Author: Marek Polacek Date: Fri Feb 16 12:25:26 2024 -0500 c++: ICE with reinterpret_cast and switch [PR113545] Jason, this is the patch you proposed for PR113545. It looks very safe so I'm posting it here so that it's not forgotten. PR c++/113545 gcc/cp/ChangeLog: * constexpr.cc (cxx_eval_switch_expr): If the condition doesn't reduce to an INTEGER_CST, consider it non-constant. gcc/testsuite/ChangeLog: * g++.dg/cpp1y/constexpr-reinterpret3.C: New test. * g++.dg/cpp1y/constexpr-reinterpret4.C: New test. (cherry picked from commit 39d989022dd0eacf1a7b95b7b20621acbe717d70)=