From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 575B73858C74; Thu, 29 Sep 2022 14:35:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 575B73858C74 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1664462147; bh=vx++W5e8igJka/KtxB5TpDweEGVriofkCYXqR0pDwZk=; h=From:To:Subject:Date:From; b=G3EyMx8SthVnnOotfqR9MJH98PWBMU7OIEKu64A38gkuyllzWO5/AnjmINQqXJHZq c7eG88O86X3EZWy6EYUhtwYNl18cB0g+7CUaaO89ND/3zwzeGDboSCobVoOuU2CnQC eZ1Iv0eS65A1K8qWNRQYExzZyNkfBLrKYeAAzzMM= From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/107087] New: bits/stl_algobase.h:431: warning: 'void* __builtin_memcpy(void*, const void*, unsigned int)' reading between 8 and 2147483644 bytes from a region of size 4 [-Wstringop-overread] Date: Thu, 29 Sep 2022 14:35:46 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 12.2.1 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter target_milestone cf_gcctarget attachments.created Message-ID: 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=3D107087 Bug ID: 107087 Summary: bits/stl_algobase.h:431: warning: 'void* __builtin_memcpy(void*, const void*, unsigned int)' reading between 8 and 2147483644 bytes from a region of size 4 [-Wstringop-overread] Product: gcc Version: 12.2.1 Status: UNCONFIRMED Keywords: diagnostic Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: redi at gcc dot gnu.org Target Milestone: --- Target: i?86-pc-linux-gnu Created attachment 53640 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D53640&action=3Dedit Gzipped preprocessed output There are bogus warnings when compiling the attached file using: g++ -O2 3.ii -m32 -c /usr/include/c++/12/bits/stl_algobase.h:431:30: warning: =E2=80=98void* __builtin_memcpy(void*, const void*, unsigned int)=E2=80=99 reading between= 8 and 2147483644 bytes from a region of size 4 [-Wstringop-overread] 431 | __builtin_memmove(__result, __first, sizeof(_Tp) * _Num= ); | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/12/bits/stl_algobase.h:431:30: warning: =E2=80=98void* __builtin_memcpy(void*, const void*, unsigned int)=E2=80=99 reading between= 8 and 2147483644 bytes from a region of size 4 [-Wstringop-overread] 431 | __builtin_memmove(__result, __first, sizeof(_Tp) * _Num= ); | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The warnings are still there on trunk, but -Warray-bounds instead of -Wstringop-overread.=