From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1270 invoked by alias); 15 Jan 2015 07:01:17 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 1251 invoked by uid 89); 15 Jan 2015 07:01:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 15 Jan 2015 07:01:14 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t0F71Dci007137 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 15 Jan 2015 02:01:13 -0500 Received: from [10.3.113.77] (ovpn-113-77.phx2.redhat.com [10.3.113.77]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t0F71Cok003151; Thu, 15 Jan 2015 02:01:12 -0500 Message-ID: <54B765B8.8060804@redhat.com> Date: Thu, 15 Jan 2015 08:13:00 -0000 From: Jeff Law User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: jb999@gmx.de, gcc-patches@gcc.gnu.org Subject: Re: [PATCH] Add missing requirement to crossmodule-indircall-1a.c References: In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-01/txt/msg01157.txt.bz2 On 11/05/14 13:30, jb999@gmx.de wrote: > "Jeff Law" : >> On 10/23/14 08:30, jb999@gmx.de wrote: >>> "Jeff Law" : >>> >>>> On 10/21/14 12:21, jb999@gmx.de wrote: >>>>> "Jeff Law" : >>>>>> On 10/21/14 16:13, Haswell wrote: >>>>>>> The additional source must have the same requirement crossmodule-indircall-1.c has. >>>>>>> >>>>>>> * crossmodule-indircall-1a.c: Add missing requirement. >>>>>> Why? When used by crossmodule-indircall-1.c we'll have already tested >>>>>> the marker and when used by itself, it does nothing. >>>>> >>>>>> So I don't see why you think a marker is needed for this source file. >>>>> >>>>> When configuring --disable-lto it gets compiled twice: >>>>> >>>>> FAIL: gcc.dg/tree-prof/crossmodule-indircall-1a.c compilation, -fprofile-generate -D_PROFILE_GENERATE >>>>> UNRESOLVED: gcc.dg/tree-prof/crossmodule-indircall-1a.c execution, -fprofile-generate -D_PROFILE_GENERATE >>>>> UNRESOLVED: gcc.dg/tree-prof/crossmodule-indircall-1a.c compilation, -fprofile-use -D_PROFILE_USE >>>>> UNRESOLVED: gcc.dg/tree-prof/crossmodule-indircall-1a.c execution, -fprofile-use -D_PROFILE_USE >>>> I'd recommend looking deeper. I believe that file should be collapsing >>>> down to main () { return 0; } when LTO is not enabled. >>> >>> I'm not a dejagnu expert, but this is what happens: >>> >>> /tmp/build/gcc/xgcc -B/tmp/build/gcc/ /tmp/gcc-4.9.1/gcc/testsuite/gcc.dg/tree-prof/crossmodule-indircall-1a.c -fno-diagnostics-show-caret -fdiagnostics-color=never /tmp/gcc-4.9.1/gcc/testsuite/gcc.dg/tree-prof/crossmodule-indircall-1a.c -fprofile-generate -D_PROFILE_GENERATE -lm -o /tmp/build/gcc/testsuite/gcc/crossmodule-indircall-1a.x01 >>> /tmp/cc4rrWCn.o: In function `main': >>> crossmodule-indircall-1a.c:(.text+0x0): multiple definition of `main' >>> /tmp/ccgMlXGi.o:crossmodule-indircall-1a.c:(.text+0x0): first defined here >>> collect2: error: ld returned 1 exit status >>> compiler exited with status 1 >> Thanks. > >> What's weird here is the source file is listed twice on the command >> line! No wonder it's failing. > >> I can't typically decipher tcl code without trace info and some >> send_user commands to see what the values of various things are. >> [...] >> Though I have no idea how that's expected to work in an LTO enabled compile. > > With LTO enabled it runs just fine (which is the reason for the patch I suggested): It's definitely some wacky dejagnu nonsense going on. So if I run both crossmodule-indircall "tests" (yes I know one is an auxiliary file, but what I'm doing emulates what happen inside all the dejagnu/tcl/expect insanity): Running /home/gcc/GIT-2/gcc/gcc/testsuite/gcc.dg/tree-prof/tree-prof.exp ... FAIL: gcc.dg/tree-prof/crossmodule-indircall-1a.c compilation, -fprofile-generate -D_PROFILE_GENERATE So, yea, in a --disable-lto toolchain I can reproduce you problem. Now it gets interesting. Let's run the two tests independently. make check-gcc RUNTESTFLAGS="tree-prof.exp=crossmodule-indircall-1.c" [ ...] Running target unix Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target. Using /usr/share/dejagnu/config/unix.exp as generic interface file for target. Using /home/gcc/GIT-2/gcc/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. Running /home/gcc/GIT-2/gcc/gcc/testsuite/gcc.dg/tree-prof/tree-prof.exp ... === gcc Summary === # of unsupported tests 1 make check-gcc RUNTESTFLAGS="tree-prof.exp=crossmodule-indircall-1a.c" [ ... ] Running target unix Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target. Using /usr/share/dejagnu/config/unix.exp as generic interface file for target. Using /home/gcc/GIT-2/gcc/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. Running /home/gcc/GIT-2/gcc/gcc/testsuite/gcc.dg/tree-prof/tree-prof.exp ... === gcc Summary === # of expected passes 4 /home/tmp/gcc3/gcc/xgcc version 5.0.0 20150115 (experimental) (GCC) Umm, WTF. if I run them independently, everything works as expected. Clearly state from running crossmodule-indircall-1.c is affecting how we "test" crossmodule-indircall-1a.c. I'm pretty sure we don't want to "fix" crossmodule-indircall-1a.c, but that the bug is in the dejagnu/tcl/expect code. Jeff