From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5A9543858420; Tue, 15 Feb 2022 12:09:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5A9543858420 From: "mark at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/63311] [9/10/11/12 Regression] -O1 optimization introduces valgrind warning Date: Tue, 15 Feb 2022 12:09:54 +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: 5.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: mark at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 9.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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, 15 Feb 2022 12:09:54 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D63311 Mark Wielaard changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mark at gcc dot gnu.org --- Comment #19 from Mark Wielaard --- This still replicates with valgrind 3.18.1 and gcc 11.2.1: $ gcc -O1 -std=3Dc11 -g PR63311.c -lm && valgrind --track-origins=3Dyes ./a= .out =3D=3D2836066=3D=3D Memcheck, a memory error detector =3D=3D2836066=3D=3D Copyright (C) 2002-2017, and GNU GPL'd, by Julian Sewar= d et al. =3D=3D2836066=3D=3D Using Valgrind-3.18.1 and LibVEX; rerun with -h for cop= yright info =3D=3D2836066=3D=3D Command: ./a.out =3D=3D2836066=3D=3D=20 =3D=3D2836066=3D=3D Conditional jump or move depends on uninitialised value= (s) =3D=3D2836066=3D=3D at 0x4011E2: test (PR63311.c:41) =3D=3D2836066=3D=3D by 0x401223: main (PR63311.c:130) =3D=3D2836066=3D=3D Uninitialised value was created by a stack allocation =3D=3D2836066=3D=3D at 0x40112D: test (PR63311.c:11) =3D=3D2836066=3D=3D=20 =3D=3D2836066=3D=3D=20 =3D=3D2836066=3D=3D HEAP SUMMARY: =3D=3D2836066=3D=3D in use at exit: 0 bytes in 0 blocks =3D=3D2836066=3D=3D total heap usage: 0 allocs, 0 frees, 0 bytes allocated =3D=3D2836066=3D=3D=20 =3D=3D2836066=3D=3D All heap blocks were freed -- no leaks are possible =3D=3D2836066=3D=3D=20 =3D=3D2836066=3D=3D For lists of detected and suppressed errors, rerun with= : -s =3D=3D2836066=3D=3D ERROR SUMMARY: 4 errors from 1 contexts (suppressed: 0 = from 0)=