From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6232 invoked by alias); 5 Nov 2014 20:30: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 6181 invoked by uid 89); 5 Nov 2014 20:30:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.2 X-HELO: mout.gmx.net Received: from mout.gmx.net (HELO mout.gmx.net) (212.227.15.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 05 Nov 2014 20:30:13 +0000 Received: from [88.130.106.179] by msvc018.dlan.cinetic.de (via HTTP); Wed, 5 Nov 2014 21:30:03 +0100 MIME-Version: 1.0 Message-ID: From: jb999@gmx.de To: "Jeff Law" , gcc-patches@gcc.gnu.org Subject: Re: Re: [PATCH] Add missing requirement to crossmodule-indircall-1a.c Content-Type: text/plain; charset=UTF-8 Date: Wed, 05 Nov 2014 20:30:00 -0000 X-UI-Out-Filterresults: notjunk:1; X-IsSubscribed: yes X-SW-Source: 2014-11/txt/msg00362.txt.bz2 "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): spawn /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 -fprofile-generate -D_PROFILE_GENERATE -lm -o /tmp/build/gcc/testsuite/gcc/crossmodule-indircall-1a.x01 PASS: gcc.dg/tree-prof/crossmodule-indircall-1a.c compilation, -fprofile-generate -D_PROFILE_GENERATE PASS: gcc.dg/tree-prof/crossmodule-indircall-1a.c execution, -fprofile-generate -D_PROFILE_GENERATE spawn /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 -fprofile-use -D_PROFILE_USE -lm -o /tmp/build/gcc/testsuite/gcc/crossmodule-indircall-1a.x02 PASS: gcc.dg/tree-prof/crossmodule-indircall-1a.c compilation, -fprofile-use -D_PROFILE_USE PASS: gcc.dg/tree-prof/crossmodule-indircall-1a.c execution, -fprofile-use -D_PROFILE_USE