From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BEA5F386F442; Thu, 11 Jun 2020 20:27:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BEA5F386F442 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1591907230; bh=OXHuWOflgdycTCsiIHQZh6C2nEYmmn9u1N2WnYR3PkQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=RnWpbDWUQOKiHIUFNcHs37S6cvfAfm/w8UG6CDhpMxDiGRgMlcXl3kWmnTbMj4BsE MQQH+vA33mttR0DZ5aPoEaJi7dvapXDqw5ZUASErdeoU0UdFpiwt9z0xqancby0T8+ I0zH7G+jQLJyIdLhKgMCtyceUFRE7oS1JmzI1f9k= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/94955] [10 Regression] ICE in to_wide Date: Thu, 11 Jun 2020 20:27:10 +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: 10.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: P3 X-Bugzilla-Assigned-To: mpolacek at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.2 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2020 20:27:10 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94955 --- Comment #10 from CVS Commits --- The releases/gcc-10 branch has been updated by Marek Polacek : https://gcc.gnu.org/g:18436d87ff85282b200579cb8da496659632ad6b commit r10-8277-g18436d87ff85282b200579cb8da496659632ad6b Author: Marek Polacek Date: Thu Jun 11 16:26:41 2020 -0400 c++: ICE when shortening right shift [PR94955] Since r10-6527 fold_for_warn calls maybe_constant_value, which means it can fold more than it previously could. In this testcase it means that cp_build_binary_op/RSHIFT_EXPR set short_shift because now we were able to fold op1 to an INTEGER_CST. But then when actually performing the shortening we crashed because cp_fold_rvalue wasn't able to fold as much as f_f_w and so tree_int_cst_sgn crashed on a NOP_EXPR. Therefore the calls should probably match. PR c++/94955 * typeck.c (cp_build_binary_op): Use fold_for_warn instead of cp_fold_rvalue. * g++.dg/cpp0x/constexpr-shift2.C: New test.=