From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8031B3858423; Tue, 21 Dec 2021 13:53:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8031B3858423 From: "pmenzel+gcc at molgen dot mpg.de" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/99578] [11/12 Regression] gcc-11 -Warray-bounds or -Wstringop-overread warning when accessing a pointer from integer literal Date: Tue, 21 Dec 2021 13:53:51 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: pmenzel+gcc at molgen dot mpg.de 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: 11.3 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: Tue, 21 Dec 2021 13:53:52 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99578 --- Comment #20 from Paul Menzel --- (In reply to Andrew Pinski from comment #19) > *** Bug 103768 has been marked as a duplicate of this bug. *** It=E2=80=99d be great, if you could advise how to address the warning in Se= aBIOS. In file included from src/fw/smm.c:18: src/fw/smm.c: In function 'smm_save_and_copy': src/string.h:23:16: warning: '__builtin_memcpy' offset [0, 511] is out = of the bounds [0, 0] [-Warray-bounds] 23 | #define memcpy __builtin_memcpy src/fw/smm.c:148:5: note: in expansion of macro 'memcpy' 148 | memcpy(&smm->cpu, &initsmm->cpu, sizeof(smm->cpu)); | ^~~~~~=