From patchwork Wed Jul 22 14:32:17 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 498575 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id E25FE1402C8 for ; Thu, 23 Jul 2015 00:33:11 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=uCPB/AWb; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; q=dns; s=default; b=J3cS9Iims4F8BuXc 0tY6/eKNub0I/C3gc0cGDdYXG1NPnlg6V9X5L617sqznQQcDoqTiUqFNfuIoW+MF sT56YIVHWmFRsirT9ebWjIsfC7HEgpko7eN0236dCa1ENuVaciHvh9K4h/mZWT8V mu4Lg6ZSi9gE+jRahl0Imbv1FG8= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; s=default; bh=zRa4abZs9GcGs0V5XDQ9t0 4csKs=; b=uCPB/AWbj9cuu1C8rgg0VQUHvOHnxQSa/GcOg/lFsm+pApZWZmuUKM JbOdLR+qYjsWh8B84Bw8/qMZmHA6KGOQAtq4kigsSN88TdOvLVBJffZ5wiq6ZEz0 ATZ1hbtzpADkqYztAXKNGYOrJJ3kpHPNPaAyqLGJF4Wfghbtw/+GE= Received: (qmail 35476 invoked by alias); 22 Jul 2015 14:33:03 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk 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 35446 invoked by uid 89); 22 Jul 2015 14:33:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 X-HELO: fencepost.gnu.org Received: from fencepost.gnu.org (HELO fencepost.gnu.org) (208.118.235.10) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 22 Jul 2015 14:33:00 +0000 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40991) by fencepost.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ZHv4s-0002rt-71 for gcc-patches@gnu.org; Wed, 22 Jul 2015 10:32:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZHv4n-0001Us-N7 for gcc-patches@gnu.org; Wed, 22 Jul 2015 10:32:57 -0400 Received: from relay1.mentorg.com ([192.94.38.131]:51728) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZHv4n-0001UM-Ht for gcc-patches@gnu.org; Wed, 22 Jul 2015 10:32:53 -0400 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-01.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1ZHv4k-00054y-PU from Thomas_Schwinge@mentor.com ; Wed, 22 Jul 2015 07:32:51 -0700 Received: from feldtkeller.schwinge.homeip.net (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.3.224.2; Wed, 22 Jul 2015 15:32:49 +0100 From: Thomas Schwinge To: Tom de Vries , "gcc-patches@gnu.org" CC: Jakub Jelinek Subject: Re: [gomp4, PATCH] Fix libgomp.oacc-c-c++-common/lib-3.c In-Reply-To: <5593CBFE.8070609@mentor.com> References: <5593CBFE.8070609@mentor.com> User-Agent: Notmuch/0.9-101-g81dad07 (http://notmuchmail.org) Emacs/24.3.1 (x86_64-pc-linux-gnu) Date: Wed, 22 Jul 2015 16:32:17 +0200 Message-ID: <87380g1cwe.fsf@schwinge.name> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Windows NT kernel [generic] [fuzzy] X-Received-From: 192.94.38.131 Hi Tom! On Wed, 1 Jul 2015 13:16:14 +0200, Tom de Vries wrote: > testcase libgomp.oacc-c-c++-common/lib-3.c is supposed to fail. > > It fails currently in two ways: > - no device found, if there is no nonhost device type supported, so > just host and host_nonshm > - no device initialized, if there is a nonhost device type supported, > f.i. nvidia > > The reason for the different failure modes is the usage of > acc_device_not_host. > > Neither of the current failure modes is matches by the current dg-output: > ... > /* { dg-output "device \[0-9\]+\\\(\[0-9\]+\\\) is initialized" } */ > ... > I don't understand what this dg-output is trying to achieve. Yeah, neither do I. I guess the behavior of libgomp changed at some point. (For avoidance of doubt, the current behavior is in accord with the specification, as far as I can tell.) > Attached patch makes sure that both current failure modes are tested and > accepted. > Fix libgomp.oacc-c-c++-common/lib-3.c > > 2015-07-01 Tom de Vries > > * testsuite/lib/libgomp.exp (offload_targets_nonhost): New var. > (check_effective_target_offload_target_nonhost_supported): New proc. > * testsuite/libgomp.oacc-c-c++-common/lib-3.c: Only run if > offload_target_nonhost_supported. > * testsuite/libgomp.oacc-c-c++-common/lib-3b.c: New test. Copy of > lib-3.c, but only run if !offload_target_nonhost_supported. Thanks, but that seemed a bit heavy-weight to me to justify this for just the small thing that this test case is, so in r226070, I committed the following to gomp-4_0-branch: commit bb8f2ef333bb999e6d5e9fe834efab3fbbefa6d8 Author: tschwinge Date: Wed Jul 22 14:24:22 2015 +0000 libgomp: Resolve XFAIL in libgomp.oacc-c-c++-common/lib-3.c libgomp/ * testsuite/libgomp.oacc-c-c++-common/lib-3.c: Resolve XFAIL. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gomp-4_0-branch@226070 138bc75d-0d04-0410-961f-82ee72b054a4 --- libgomp/ChangeLog.gomp | 4 ++++ libgomp/testsuite/libgomp.oacc-c-c++-common/lib-3.c | 10 +++++----- 2 files changed, 9 insertions(+), 5 deletions(-) Grüße, Thomas diff --git libgomp/ChangeLog.gomp libgomp/ChangeLog.gomp index 746003f..d71282c 100644 --- libgomp/ChangeLog.gomp +++ libgomp/ChangeLog.gomp @@ -1,3 +1,7 @@ +2015-07-22 Thomas Schwinge + + * testsuite/libgomp.oacc-c-c++-common/lib-3.c: Resolve XFAIL. + 2015-07-21 James Norris * testsuite/libgomp.oacc-c-c++-common/asyncwait-1.c: Additional tests. diff --git libgomp/testsuite/libgomp.oacc-c-c++-common/lib-3.c libgomp/testsuite/libgomp.oacc-c-c++-common/lib-3.c index d5f390d..e00053c 100644 --- libgomp/testsuite/libgomp.oacc-c-c++-common/lib-3.c +++ libgomp/testsuite/libgomp.oacc-c-c++-common/lib-3.c @@ -1,4 +1,6 @@ -/* { dg-do run } */ +/* Expect an error message when shutting down a device different from the one + that has been initialized. */ +/* { dg-do run { target { ! openacc_host_selected } } } */ #include @@ -6,12 +8,10 @@ int main (int argc, char **argv) { acc_init (acc_device_host); - - acc_shutdown (acc_device_not_host); + acc_shutdown (acc_device_default); return 0; } -/* TODO: currently prints: "libgomp: no device found". */ -/* { dg-output "device \[0-9\]+\\\(\[0-9\]+\\\) is initialized" { xfail *-*-* } } */ +/* { dg-output "no device initialized" } */ /* { dg-shouldfail "" } */