From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 237F73858D37; Sun, 9 Oct 2022 19:32:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 237F73858D37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1665343943; bh=huMaTlGRGqDA8JiMF4Tf1HJJYMlcdZnkVPPNFmqS9Tg=; h=From:To:Subject:Date:From; b=JK8TJKeeAL7I84w4folTEaCNGY+R+pLCQaQ7uydDNquDk9786b7m5UoVgnAumwDia D4BWFuXth/Yg1hfNUeRJRArDwaUBqrFx+XcuAafNhJkd20iSNuF26GwYv8yGZQ7P1A Jp3VEmDNYjmlUxdu/GIBwGiBp9kY4Z5/vCZwrHAs= From: "dcb314 at hotmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/107197] New: valgrind error in function same_line_p during build Date: Sun, 09 Oct 2022 19:32:22 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dcb314 at hotmail dot com 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 bug_severity priority component assigned_to reporter target_milestone 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=3D107197 Bug ID: 107197 Summary: valgrind error in function same_line_p during build Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: dcb314 at hotmail dot com Target Milestone: --- I've just had a go at building gcc trunk with -O3 under valgrind and I got the following error: /home/dcb/gcc/working/./gcc/xgcc -B/home/dcb/gcc/working/./gcc/ -B/home/dcb/gcc/results.20221009.valgrind/x86_64-pc-linux-gnu/bin/ -B/home/dcb/gcc/results.20221009.valgrind/x86_64-pc-linux-gnu/lib/ -isystem /home/dcb/gcc/results.20221009.valgrind/x86_64-pc-linux-gnu/include -isystem /home/dcb/gcc/results.20221009.valgrind/x86_64-pc-linux-gnu/sys-include = -g -O3 -O2 -g -O3 -DIN_GCC -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-q= ual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -I. -I. -I../.././gcc -I../../../trunk.git/libgcc -I../../../trunk.git/libgcc/. -I../../../trunk.git/libgcc/../gcc -I../../../trunk.git/libgcc/../include -I../../../trunk.git/libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT -g0= =20 -finhibit-size-directive -fno-inline -fno-exceptions -fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-tree-vectorize -fbuilding-libgcc -fno-stack-protector -I. -I. -I../.././gcc -I../../../trunk.git/libgcc -I../../../trunk.git/libgcc/. -I../../../trunk.git/libgcc/../gcc -I../../../trunk.git/libgcc/../include -I../../../trunk.git/libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT -o crtendS.o -MT crtendS.o -MD -MP -MF crtendS.dep -fno-omit-frame-pointer -fno-asynchronous-unwind-tables -fcf-protection -mshstk -fpic -c ../../../trunk.git/libgcc/crtstuff.c -DCRT_END -DCRTSTUFFS_O =3D=3D107792=3D=3D Conditional jump or move depends on uninitialised value(= s) =3D=3D107792=3D=3D at 0xD5004B: same_line_p (tree-cfg.cc:1160) =3D=3D107792=3D=3D by 0xD5004B: assign_discriminators (tree-cfg.cc:1224) =3D=3D107792=3D=3D by 0xD5004B: build_gimple_cfg (tree-cfg.cc:251) =3D=3D107792=3D=3D by 0xD5004B: execute_build_cfg (tree-cfg.cc:371) $ egrep "^Config|^=3D=3D" mk.out=20 Configuring in x86_64-pc-linux-gnu/libgcc =3D=3D107792=3D=3D Conditional jump or move depends on uninitialised value(= s) So the problem occurs when building libgcc. Configure command is ../trunk.git/configure --prefix=3D/home/dcb/gcc/$PREFIX \ --disable-bootstrap \ --disable-multilib \ --disable-werror \ --with-pkgversion=3D$HASH \ --enable-checking=3Dvalgrind \ --enable-languages=3Dc,c++ and to get -O3 into it, I have sed 's/-O2/-O3/' < Makefile > Makefile.tmp diff Makefile Makefile.tmp mv Makefile.tmp Makefile for the top-level Makefile.=