From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3E4813858D35; Mon, 15 Jun 2020 19:54:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3E4813858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1592250872; bh=XkXyEDSt+ZC5EEPgnqtXI41Tbqa6ywaRv1GOT+N4kY0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=BXRKRQTuz2eQNCNbiXg9UtcW2WcZw9nNSvzXi0OUSyTISDgDTkc950eLG3KbznHdX WPVtn1u2dNS8VgTv+nVuo8p1EUbf7OAYZ9tfzt2BAXlO3hqIN47UpyAHuuzLC/TOuf MGuagjzo3rIAxV2TdNtT2xiSU02Bp/cxcHkEkzmI= From: "qinzhao at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug gcov-profile/95348] GCC records zero functions and modules in the profiling data file, ICC does NOT Date: Mon, 15 Jun 2020 19:54:32 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: gcov-profile X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: qinzhao at gcc dot gnu.org X-Bugzilla-Status: WAITING X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: marxin at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.0 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: Mon, 15 Jun 2020 19:54:32 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D95348 --- Comment #36 from qinzhao at gcc dot gnu.org --- I found a bug with this proposed patch: when doing automatic merging, the following error message is emitted: Merge mismatch for function 1. the bug can be repeated with the small testing case I added in the comment = #1 and the following script: #!/bin/bash=20 GCC=3D/GCC-install-dir/bin/gcc=20 opt=3D"-O0 "=20 opt=3D"$opt -fno-inline"=20 opt_gen=3D"-fprofile-generate"=20 opt_gen=3D"$opt_gen -fprofile-dir=3Dgcc_prof_dir"=20 tf1=3D"five.c"=20 tf2=3D"ten.c"=20 libf=3D"lib.c"=20 rm -rf gcc_prof_dir=20 echo $GCC $opt $opt_gen -c $libf=20 $GCC $opt $opt_gen -c $libf -o lib.o=20 echo $GCC $opt $opt_gen $tf1=20 $GCC $opt $opt_gen -c $tf1 -o five.o=20 echo $GCC $opt $opt_gen $tf2=20 $GCC $opt $opt_gen -c $tf2 -o ten.o=20 echo $GCC $opt $opt_gen ten.o five.o lib.o -o ten=20 $GCC $opt $opt_gen ten.o five.o lib.o -o ten=20 ./ten 12=20 ./ten 11 echo "Done"=20 [qinzhao@localhost small_gcc]$ sh build_it_gcc /home/qinzhao/Install/latest-821/bin/gcc -O0 -fno-inline -fprofile-generate -fprofile-dir=3Dgcc_prof_dir -c lib.c /home/qinzhao/Install/latest-821/bin/gcc -O0 -fno-inline -fprofile-generate -fprofile-dir=3Dgcc_prof_dir five.c /home/qinzhao/Install/latest-821/bin/gcc -O0 -fno-inline -fprofile-generate -fprofile-dir=3Dgcc_prof_dir ten.c /home/qinzhao/Install/latest-821/bin/gcc -O0 -fno-inline -fprofile-generate -fprofile-dir=3Dgcc_prof_dir ten.o five.o lib.o -o ten 12 is greater than ten 11 is greater than ten profiling:gcc_prof_dir/#home#qinzhao#Bugs#profile#small_gcc#lib.gcda:Merge mismatch for function 1 profiling:gcc_prof_dir/#home#qinzhao#Bugs#profile#small_gcc#five.gcda:Merge mismatch for function 0 Done=