From patchwork Fri Jun 7 18:41: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: 17692 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ea0-f197.google.com (mail-ea0-f197.google.com [209.85.215.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id CD4A72395F for ; Fri, 7 Jun 2013 18:41:27 +0000 (UTC) Received: by mail-ea0-f197.google.com with SMTP id a15sf1045054eae.0 for ; Fri, 07 Jun 2013 11:41:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-beenthere:x-forwarded-to:x-forwarded-for:delivered-to: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=yPpltrIxUHqmZ9d/V/HCMeZyv7UDiSxvhxeAwq5UBlI=; b=S4ow8AMUaUPAiJ3QIGOvAiHRBGDlRGtokbiuktupwB1yQRW6kb6Dw0i6NsPVXy9WI9 CPjc+nBWmMz/kDjcoyTKoJvu+NwEZOCQMBlS7Apf9edXip4ksifVDouc9YNk98nPnIuL 5iW8yNrvdYd8xSTl/00FC05muZZbdgazg6IOj+aOEohbZsSqVMuvszo/k4BgPQ0iUsqI ZKchqUZGlZq4UQE6W2AmCMI3oXdFmBXGh3sn8+WO1dtP4jjifbxJDH03vDtOuj1zww3s hst5bH4Uj3VYALEAmPrilBcp0h8xDoCNFozGuZ1TT0RaUTNY+zajNeE8+1U4iJRCQH+u L7AA== X-Received: by 10.180.21.226 with SMTP id y2mr30707wie.5.1370630486657; Fri, 07 Jun 2013 11:41:26 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.180.36.15 with SMTP id m15ls327423wij.7.gmail; Fri, 07 Jun 2013 11:41:26 -0700 (PDT) X-Received: by 10.180.187.234 with SMTP id fv10mr2590522wic.29.1370630486445; Fri, 07 Jun 2013 11:41:26 -0700 (PDT) Received: from mail-ve0-x22f.google.com (mail-ve0-x22f.google.com [2607:f8b0:400c:c01::22f]) by mx.google.com with ESMTPS id cs6si10009955wib.84.2013.06.07.11.41.26 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 07 Jun 2013 11:41:26 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c01::22f is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c01::22f; Received: by mail-ve0-f175.google.com with SMTP id da11so3255428veb.6 for ; Fri, 07 Jun 2013 11:41:25 -0700 (PDT) X-Received: by 10.52.155.67 with SMTP id vu3mr20582882vdb.94.1370630485375; Fri, 07 Jun 2013 11:41: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.221.10.206 with SMTP id pb14csp125667vcb; Fri, 7 Jun 2013 11:41:24 -0700 (PDT) X-Received: by 10.180.74.235 with SMTP id x11mr34186wiv.5.1370630484336; Fri, 07 Jun 2013 11:41:24 -0700 (PDT) Received: from mail-we0-x22f.google.com (mail-we0-x22f.google.com [2a00:1450:400c:c03::22f]) by mx.google.com with ESMTPS id g13si5892wjz.82.2013.06.07.11.41.23 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 07 Jun 2013 11:41:24 -0700 (PDT) Received-SPF: neutral (google.com: 2a00:1450:400c:c03::22f is neither permitted nor denied by best guess record for domain of will.newton@linaro.org) client-ip=2a00:1450:400c:c03::22f; Received: by mail-we0-f175.google.com with SMTP id t59so3306994wes.20 for ; Fri, 07 Jun 2013 11:41:23 -0700 (PDT) X-Received: by 10.194.123.69 with SMTP id ly5mr3529wjb.29.1370630483730; Fri, 07 Jun 2013 11:41: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 ESMTPSA id f8sm1862174wiv.0.2013.06.07.11.41.22 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 07 Jun 2013 11:41:22 -0700 (PDT) Message-ID: <51B22951.1000601@linaro.org> Date: Fri, 07 Jun 2013 19:41:21 +0100 From: Will Newton User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130514 Thunderbird/17.0.6 MIME-Version: 1.0 To: gdb-patches@sourceware.org CC: patches@linaro.org Subject: [PATCH] testsuite/gdb.base: Make skip test not rely on undefined behaviour. X-Gm-Message-State: ALoCoQkb+TMXp3ld7xAyEyrG4zzupZGjXoQQrGcovZURGi6ZCDfwMlnDn0Ct0IWAg6p6ZwohiYWT X-Original-Sender: will.newton@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c01::22f 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 skip test currently relies on the order of evaluation of arguments which is not defined. Use an arithmetic expression where order is defined instead. gdb/testsuite/ChangeLog: 2013-06-07 Will Newton * gdb.base/skip.c: Add results of foo() and bar() before passing to baz(). * gdb.base/skip.c: baz() now takes one argument instead of two. --- gdb/testsuite/gdb.base/skip.c | 4 ++-- gdb/testsuite/gdb.base/skip1.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gdb/testsuite/gdb.base/skip.c b/gdb/testsuite/gdb.base/skip.c index 565ba93..1281d17 100644 --- a/gdb/testsuite/gdb.base/skip.c +++ b/gdb/testsuite/gdb.base/skip.c @@ -1,10 +1,10 @@ int foo(); int bar(); -int baz(int, int); +int baz(int); int main() { - return baz(foo(), bar()); + return baz(bar() + foo()); } int foo() diff --git a/gdb/testsuite/gdb.base/skip1.c b/gdb/testsuite/gdb.base/skip1.c index 2dab5c3..fe63cd6 100644 --- a/gdb/testsuite/gdb.base/skip1.c +++ b/gdb/testsuite/gdb.base/skip1.c @@ -3,7 +3,7 @@ int bar() return 1; } -int baz(int a, int b) +int baz(int a) { - return a + b; + return a + 1; }