From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1D95F3851405; Wed, 23 Nov 2022 19:12:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1D95F3851405 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1669230726; bh=K2w9ZkOPIm9KvDJRdTCP+yJnGiczj8V9QWIU2dCv+jY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=iydnvGz4+kMv1EoU+1R4bqk3o5jB9e3VgKk6GIcm0dZMTxH88kHy7bLZqlWh//oxy NZP5ftepqtZm3IIbnk1OUSsElM2ojnt2NkEc4LJUgqeV3KhhXi7XN/RBxZAe6udBIe k9b+qFMZngvhQOIq+D8RoED2Of4V3uJ+muAjdN5Y= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/107846] [13 Regression] error: result of '8000 << 8' requires 22 bits to represent, but 'short int' only has 16 bits Date: Wed, 23 Nov 2022 19:12:02 +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: diagnostic, needs-bisection X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.0 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=3D107846 --- Comment #4 from Andrew Pinski --- #0 warning_at (location=3D0, opt=3D765, gmsgid=3D0x30ecaf8 "result of %qE = requires %u bits to represent, but %qT only has %u bits") at /home/apinski/src/upstream-gcc-git/gcc/gcc/diagnostic.cc:1845 #1 0x0000000000d3a2e2 in maybe_warn_shift_overflow (loc=3D0, op0=3D0x7ffff= 6e949c0, op1=3D0x7ffff6e94960) at /home/apinski/src/upstream-gcc-git/gcc/gcc/c-family/c-warn.cc:2645 #2 0x0000000000c62e14 in c_fully_fold_internal (expr=3D0x7ffff6e84cf8, in_init=3Dfalse, maybe_const_operands=3D0x7fffffffce5b, maybe_const_itself=3D0x7fffffffce5a, for_int_const=3Dfalse, lval=3Dfalse) at /home/apinski/src/upstream-gcc-git/gcc/gcc/c/c-fold.cc:429 #3 0x0000000000c62358 in c_fully_fold_internal (expr=3D0x7ffff6e84d20, in_init=3Dfalse, maybe_const_operands=3D0x7fffffffce5b, maybe_const_itself=3D0x7fffffffce5a, for_int_const=3Dfalse, lval=3Dfalse) at /home/apinski/src/upstream-gcc-git/gcc/gcc/c/c-fold.cc:354 #4 0x0000000000c63089 in c_fully_fold_internal (expr=3D0x7ffff6e96420, in_init=3Dfalse, maybe_const_operands=3D0x7fffffffce5b, maybe_const_itself=3D0x7fffffffce5a, for_int_const=3Dfalse, lval=3Dfalse) at /home/apinski/src/upstream-gcc-git/gcc/gcc/c/c-fold.cc:473 #5 0x0000000000c614ab in c_fully_fold (expr=3D0x7ffff6e96420, in_init=3Dfa= lse, maybe_const=3D0x7fffffffce5b, lval=3Dfalse) at /home/apinski/src/upstream-gcc-git/gcc/gcc/c/c-fold.cc:125=