From patchwork Mon Apr 22 16:18:21 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Newton X-Patchwork-Id: 16325 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f197.google.com (mail-vc0-f197.google.com [209.85.220.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 57EFE23919 for ; Mon, 22 Apr 2013 16:19:13 +0000 (UTC) Received: by mail-vc0-f197.google.com with SMTP id hf12sf12588430vcb.4 for ; Mon, 22 Apr 2013 09:18:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-beenthere:x-received:received-spf:x-received :x-forwarded-to:x-forwarded-for:delivered-to:x-received:received-spf :x-received:message-id:date:from:user-agent:mime-version:to:cc :subject:x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe :content-type:content-transfer-encoding; bh=sEaPyLqOoH9m0Zi/xSdiHgFcKbtU//nL2e2aLVvMo60=; b=ckeauGevac98JsE7MlFAS3Qhkv5Iov9z1p4SRiUjASk+oWfGFLvIpbbCpTEUHgSflZ VS93VECsNwcrRYUyBGe57eQWUkqAulATUS6bKA9um5fgf2OJaOg4x8Y8h9vbiEziYTbD bbfa8NOcu+lF8QsYcUGHLwHMuQ7G/AS8PfMEGSotQHzb9hEFR7YE5bx/Go22JXXjb0kF XBgIEI8IgZektjYGK5jcRFngYZY0GtQryEr9SoIq+rc4on0+2uxChFP3clP8CFW1txkA OvbusL2xN1rdFhDPeDXNr3bcAPasmD/tURtonLM19JzGYJKsnC36ua1EuV8vlNaxNDcN Ez6Q== X-Received: by 10.224.178.205 with SMTP id bn13mr20306210qab.3.1366647506096; Mon, 22 Apr 2013 09:18:26 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.47.78 with SMTP id b14ls567606qen.4.gmail; Mon, 22 Apr 2013 09:18:25 -0700 (PDT) X-Received: by 10.58.220.129 with SMTP id pw1mr19717048vec.32.1366647505962; Mon, 22 Apr 2013 09:18:25 -0700 (PDT) Received: from mail-vc0-f180.google.com (mail-vc0-f180.google.com [209.85.220.180]) by mx.google.com with ESMTPS id ij9si16267074vdb.108.2013.04.22.09.18.25 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 22 Apr 2013 09:18:25 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.180 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.180; Received: by mail-vc0-f180.google.com with SMTP id m17so181650vca.11 for ; Mon, 22 Apr 2013 09:18:25 -0700 (PDT) X-Received: by 10.220.242.73 with SMTP id lh9mr19367473vcb.49.1366647505804; Mon, 22 Apr 2013 09:18:25 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.58.127.98 with SMTP id nf2csp84633veb; Mon, 22 Apr 2013 09:18:25 -0700 (PDT) X-Received: by 10.180.182.110 with SMTP id ed14mr51168354wic.6.1366647504511; Mon, 22 Apr 2013 09:18:24 -0700 (PDT) Received: from mail-we0-x22e.google.com (mail-we0-x22e.google.com [2a00:1450:400c:c03::22e]) by mx.google.com with ESMTPS id d20si4963184wiv.118.2013.04.22.09.18.24 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 22 Apr 2013 09:18:24 -0700 (PDT) Received-SPF: neutral (google.com: 2a00:1450:400c:c03::22e is neither permitted nor denied by best guess record for domain of will.newton@linaro.org) client-ip=2a00:1450:400c:c03::22e; Received: by mail-we0-f174.google.com with SMTP id u12so6569997wey.19 for ; Mon, 22 Apr 2013 09:18:24 -0700 (PDT) X-Received: by 10.180.188.3 with SMTP id fw3mr22459475wic.33.1366647503866; Mon, 22 Apr 2013 09:18:23 -0700 (PDT) Received: from localhost.localdomain (cpc11-seac20-2-0-cust84.7-2.cable.virginmedia.com. [81.108.156.85]) by mx.google.com with ESMTPS id f9sm26499253eeu.11.2013.04.22.09.18.22 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 22 Apr 2013 09:18:23 -0700 (PDT) Message-ID: <517562CD.6010701@linaro.org> Date: Mon, 22 Apr 2013 17:18:21 +0100 From: Will Newton User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130402 Thunderbird/17.0.5 MIME-Version: 1.0 To: binutils@sourceware.org CC: patches@linaro.org Subject: [PATCH] ld-plugin/lto.exp: Disable ld/12942 test for gcc < 4.7.0. X-Gm-Message-State: ALoCoQkz16g2zwdaoC38pg3EKd78qkHvJvQi41gc2qx3T1H/go9oZe/t5e0gzbhoiZIS378INy5g X-Original-Sender: will.newton@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.180 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The test for ld/12942 fails with gcc versions before 4.7.0. This patch disables this test with these versions of gcc. ld/testsuite/ChangeLog: 2013-04-22 Will Newton * ld-plugin/lto.exp: Disable ld/12942 test for gcc < 4.7.0. --- ld/testsuite/ld-plugin/lto.exp | 50 ++++++++++++++++++++++++++---------------- 1 file changed, 31 insertions(+), 19 deletions(-) diff --git a/ld/testsuite/ld-plugin/lto.exp b/ld/testsuite/ld-plugin/lto.exp index 09474a6..c5249f0 100644 --- a/ld/testsuite/ld-plugin/lto.exp +++ b/ld/testsuite/ld-plugin/lto.exp @@ -125,12 +125,6 @@ set lto_link_tests { {"PR ld/12760" "-O2 -Wl,-e,foo -nostdlib -flto -fuse-linker-plugin tmpdir/pr12760a.o -Wl,--start-group tmpdir/libpr12760.a -Wl,--end-group" "" {dummy.c} {} "pr12760.exe" "c" "warning: Bad bar"} - {"Build libdummy.a PR ld/12942 (1)" - "" "-flto -O2" - {pr12942a.cc pr12942c.cc} {} "libdummy.a" "c++"} - {"Build libdummy.a PR ld/12942 (2)" - "" "-O0" - {pr12942b.cc} {} "libdummy.a" "c++"} {"Build libpr13183.a" "-T" "-flto -O2" {pr13183a.c} {} "libpr13183.a"} @@ -148,6 +142,17 @@ set lto_link_tests { {pr15323a.c} {} "libdummy.a" "c"} } +if { [at_least_gcc_version 4 7] } { + set lto_link_tests [concat $lto_link_tests { + {"Build libdummy.a PR ld/12942 (1)" + "" "-flto -O2" + {pr12942a.cc pr12942c.cc} {} "libdummy.a" "c++"} + {"Build libdummy.a PR ld/12942 (2)" + "" "-O0" + {pr12942b.cc} {} "libdummy.a" "c++"} + }] +} + # Generate input files for complex LTO tests for ELF. set lto_link_elf_tests { {"Build libdummy.a 7" @@ -257,12 +262,6 @@ set lto_run_tests { {"LTO 15" "-O2 -flto -fuse-linker-plugin -Wl,--start-group tmpdir/liblto-15.a tmpdir/lto-15a.o -Wl,--end-group" "" {dummy.c} "lto-15.exe" "lto-15.out" "" "c"} - {"PR ld/12942 (1)" - "-O2 -flto -fuse-linker-plugin tmpdir/pr12942a.o tmpdir/pr12942b.o" "" - {dummy.c} "pr12942a.exe" "pr12942.out" "" "c++"} - {"PR ld/12942 (2)" - "-O2 -flto -fuse-linker-plugin tmpdir/pr12942a.o tmpdir/pr12942c.o" "" - {dummy.c} "pr12942c.exe" "pr12942.out" "" "c++"} {"PR ld/13066" "-O2 -flto -fuse-linker-plugin" "" {pr13066.cc} "pr13066.exe" "pr13066.out" "" "c++"} @@ -274,6 +273,17 @@ set lto_run_tests { {pr15323b.c} "pr15323.exe" "pr15323.out" "-flto -O2" "c"} } +if { [at_least_gcc_version 4 7] } { + set lto_run_tests [concat $lto_run_tests { + {"PR ld/12942 (1)" + "-O2 -flto -fuse-linker-plugin tmpdir/pr12942a.o tmpdir/pr12942b.o" "" + {dummy.c} "pr12942a.exe" "pr12942.out" "" "c++"} + {"PR ld/12942 (2)" + "-O2 -flto -fuse-linker-plugin tmpdir/pr12942a.o tmpdir/pr12942c.o" "" + {dummy.c} "pr12942c.exe" "pr12942.out" "" "c++"} + }] +} + # LTO run-time tests for ELF set lto_run_elf_tests { {"LTO 7" @@ -311,13 +321,15 @@ if {![string match "" $catch_output]} { return } -# Check expected LTO linker errors. -set testname "PR ld/12942 (3)" -set exec_output [run_host_cmd "$CXX" "$gcc_gas_flag $gcc_ld_flag -O2 -flto -fuse-linker-plugin tmpdir/pr12942b.o tmpdir/pr12942a.o"] -if { [ regexp "undefined reference to `link_error\\(\\)'" $exec_output ] } { - pass $testname -} { - fail $testname +if { [at_least_gcc_version 4 7] } { + # Check expected LTO linker errors. + set testname "PR ld/12942 (3)" + set exec_output [run_host_cmd "$CXX" "$gcc_gas_flag $gcc_ld_flag -O2 -flto -fuse-linker-plugin tmpdir/pr12942b.o tmpdir/pr12942a.o"] + if { [ regexp "undefined reference to `link_error\\(\\)'" $exec_output ] } { + pass $testname + } { + fail $testname + } } # Run "ld -r" to generate inputs for complex LTO tests.