From patchwork Thu Apr 9 11:10:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yvan Roux X-Patchwork-Id: 46937 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f71.google.com (mail-wg0-f71.google.com [74.125.82.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 81A27218D6 for ; Thu, 9 Apr 2015 11:11:04 +0000 (UTC) Received: by wghm4 with SMTP id m4sf25763417wgh.2 for ; Thu, 09 Apr 2015 04:11:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:mailing-list:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:sender :delivered-to:mime-version:in-reply-to:references:date:message-id :subject:from:to:cc:content-type:x-original-sender :x-original-authentication-results; bh=UsEIHrSa3ooA3ma4L6LeRApU2S6/UkcoeULYcAsERys=; b=EZFYL8rIBo3mGmhF93lw97r8bRYvbRlPjUFQLqopVxVsYTw4AflWIxtszlxseAE9kD wtVKKQCO4XCQ+ROZanTDOT1A8fFwzSD0dXbHbNMTgk3IAB/IqyzbV+3VyV8oAOQbSrnZ 1S6PX4A0rYD2kzpYD64wgAqW/ZKNdLeETsO5bRqbg9FFuSZOS9cVAyZSDb61hV4HaBN8 9f3Hzwb8Tz8Zd1dcjfKAEZVNbNBw60wOWvMVO0tdofhCujhENXlCrlGjXkl0BL/KAxnw Hf/oBelJRXIYTL+K8J57x7KQs411891ewAdNF+WYe5VBvQBPEz0Tw4IkfWZsKU+d14f/ t6hw== X-Gm-Message-State: ALoCoQkN9TmSgp9jtZU0z6W6di5/Bfqz5ZUuuposzQnRIQMIl9huUm5L6Wz/3BlQy9LAudSl9yRs X-Received: by 10.180.150.115 with SMTP id uh19mr491229wib.7.1428577863785; Thu, 09 Apr 2015 04:11:03 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.228.169 with SMTP id sj9ls309360lac.35.gmail; Thu, 09 Apr 2015 04:11:03 -0700 (PDT) X-Received: by 10.112.72.132 with SMTP id d4mr9519171lbv.1.1428577863627; Thu, 09 Apr 2015 04:11:03 -0700 (PDT) Received: from mail-la0-x230.google.com (mail-la0-x230.google.com. [2a00:1450:4010:c03::230]) by mx.google.com with ESMTPS id lv6si3272192lac.86.2015.04.09.04.11.03 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Apr 2015 04:11:03 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c03::230 as permitted sender) client-ip=2a00:1450:4010:c03::230; Received: by lagv1 with SMTP id v1so86800699lag.3 for ; Thu, 09 Apr 2015 04:11:03 -0700 (PDT) X-Received: by 10.112.141.202 with SMTP id rq10mr27733457lbb.88.1428577863361; Thu, 09 Apr 2015 04:11:03 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.67.65 with SMTP id l1csp402298lbt; Thu, 9 Apr 2015 04:11:01 -0700 (PDT) X-Received: by 10.66.156.7 with SMTP id wa7mr54477902pab.99.1428577860982; Thu, 09 Apr 2015 04:11:00 -0700 (PDT) Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id jd7si6006077pbd.221.2015.04.09.04.10.59 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Apr 2015 04:11:00 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-394837-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Received: (qmail 32219 invoked by alias); 9 Apr 2015 11:10:46 -0000 Mailing-List: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 32198 invoked by uid 89); 9 Apr 2015 11:10:45 -0000 X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wi0-f180.google.com Received: from mail-wi0-f180.google.com (HELO mail-wi0-f180.google.com) (209.85.212.180) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 09 Apr 2015 11:10:44 +0000 Received: by widjs5 with SMTP id js5so52690224wid.1 for ; Thu, 09 Apr 2015 04:10:41 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.180.84.67 with SMTP id w3mr5413965wiy.68.1428577841245; Thu, 09 Apr 2015 04:10:41 -0700 (PDT) Received: by 10.28.4.204 with HTTP; Thu, 9 Apr 2015 04:10:41 -0700 (PDT) In-Reply-To: References: <5523F167.3010606@redhat.com> <20150407155143.GK19273@tucnak.redhat.com> <20150407193339.GN19273@tucnak.redhat.com> Date: Thu, 9 Apr 2015 13:10:41 +0200 Message-ID: Subject: Re: patch to fix PR65648 From: Yvan Roux To: Jakub Jelinek Cc: Vladimir Makarov , Terry Guo , gcc-patches X-IsSubscribed: yes X-Original-Sender: yvan.roux@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c03::230 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=pass header.i=@gcc.gnu.org X-Google-Group-Id: 836684582541 Hi On 7 April 2015 at 22:02, Yvan Roux wrote: > On 7 April 2015 at 21:33, Jakub Jelinek wrote: >> On Tue, Apr 07, 2015 at 09:28:51PM +0200, Yvan Roux wrote: >>> validation is ongoing, but here is my attempt to add this testcase, >>> does it look correct (it's the first time I use that kind of include >>> in testsuite) >> >> The intent is that we have a testcase for all targets at various >> optimization levels, plus one with specific options for the particular >> target. >> If you get at least one FAIL with this patch with Vlad's patch reverted and >> no FAILs with that patch, the patch is ok for trunk with the obvious >> ChangeLog entry. As this testcase needs to be executed, we can have some conflict at link time, depending on how the libs were compiled. Here is what I've for the moment, let me know if it's ok and/or if you have suggestion on how to improve it. - armv6 doesn't support the hard-float ABI in Thumb mode, I disable the testcase with this directive, but not sure it's the best way: { dg-skip-if "avoid conflicting multilib options" { *-*-*eabihf } { "*" } { "" } }ot - The original problem was reported on armv6-m arch. but is not related to the M profile, if we stick to armv6-m the link will fail on compiler which default to the -A profile. As my guess is that -A profile is more widely tested, I changed the -march flag to armv6. Do you think it's ok ? With the attached patch there is only 1 FAIL before Vlad's patch on the execution of the test and they all PASS when testing arm-linux-gnueabi, and the target test is UNSUPPORTED when test arm-linux-gnueabihf. Cheers, Yvan 2105-04-09 Yvan Roux PR target/65648 * gcc.c-torture/execute/pr65648.c: New test. * gcc.target/arm/pr65648.c: New test. diff --git a/gcc/testsuite/gcc.c-torture/execute/pr65648.c b/gcc/testsuite/gcc.c-torture/execute/pr65648.c new file mode 100644 index 0000000..88a2fc9 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/pr65648.c @@ -0,0 +1,34 @@ +/* PR target/65648 */ + +int a = 0, *b = 0, c = 0; +static int d = 0; +short e = 1; +static long long f = 0; +long long *i = &f; +unsigned char j = 0; + +__attribute__((noinline, noclone)) void +foo (int x, int *y) +{ + asm volatile ("" : : "r" (x), "r" (y) : "memory"); +} + +__attribute__((noinline, noclone)) void +bar (const char *x, long long y) +{ + asm volatile ("" : : "r" (x), "r" (&y) : "memory"); + if (y != 0) + __builtin_abort (); +} + +int +main () +{ + int k = 0; + b = &k; + j = (!a) - (c <= e); + *i = j; + foo (a, &k); + bar ("", f); + return 0; +} diff --git a/gcc/testsuite/gcc.target/arm/pr65648.c b/gcc/testsuite/gcc.target/arm/pr65648.c new file mode 100644 index 0000000..e075546 --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/pr65648.c @@ -0,0 +1,9 @@ +/* { dg-do run } */ +/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv6" } } */ +/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */ +/* { dg-skip-if "avoid conflicting multilib options" { *-*-*eabihf } { "*" } { "" } } */ +/* { dg-options "-mthumb -Os -mfloat-abi=soft" } */ +/* { dg-add-options arm_arch_v6 } */ + +#include "../../gcc.c-torture/execute/pr65648.c" +