From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D20EE38560BA; Wed, 25 May 2022 07:34:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D20EE38560BA From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/105723] Optimization false positive warning Date: Wed, 25 May 2022 07:34:20 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 12.1.1 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth 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: keywords component 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: Wed, 25 May 2022 07:34:20 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105723 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |diagnostic Component|c++ |libstdc++ --- Comment #1 from Richard Biener --- In file included from /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/algorithm:61, from :1: In function '_OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation) [with _IIter =3D reverse_iterator<__gnu_cxx::__normal_iterator > >; _OIter =3D reverse_iterator<__gnu_cxx::__normal_iterator > >; _UnaryOperation =3D some_func(const uint8_t* const&)::]', inlined from 'void some_func(const uint8_t* const&)' at :15:23: /opt/compiler-explorer/gcc-12.1.0/include/c++/12.1.0/bits/stl_algo.h:4263:1= 9: error: writing 1 byte into a region of size 0 [-Werror=3Dstringop-overflow= =3D] 4263 | *__result =3D __unary_op(*__first); | ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ compilation terminated due to -Wfatal-errors. cc1plus: some warnings being treated as errors Compiler returned: 1=