From patchwork Fri Jan 11 11:48:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 1023536 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-493848-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="XM9z42eV"; dkim-atps=neutral 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 43bh3H63R0z9s4s for ; Fri, 11 Jan 2019 22:48:58 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:mime-version:content-type; q=dns; s=default; b=vLyQ49PJaRFLDNlo4Rt47qTFKckxNmrdVYkHHFgOZQSkfLmZul q0QEY6nazEnZxMDiCFqkv/i41O+sWQ7zfLTU6pYdzayvf1wbXXl5pjIEN2mYS7PY 2hYf/u9cj/ekRcPhUUK75g904Dc2zsN6p7tq9Goj/2f5Hh+WYiGuqJMSs= 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:date :from:to:cc:subject:message-id:mime-version:content-type; s= default; bh=4MJnbNMYiP8VNJfX/yz4oiStbvE=; b=XM9z42eV2lR6E4S10YtM KuDi/KuYA3ak8HC6F2FMyYaQPhg7pVl5sT86ddzRpbf1LmHxGBTH/7Ke6t5l1/sf PicKh+UgJCdRZMV9LVLQt6Nx4ZCu6u9kuJWsdXKylE2bB3S2KBJ1PgTAd0TDPEdt v8+M8Ni/HfPyzPqzeCuE6Io= Received: (qmail 17046 invoked by alias); 11 Jan 2019 11:48:49 -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 16658 invoked by uid 89); 11 Jan 2019 11:48:26 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS autolearn=ham version=3.3.2 spammy=resources, Hx-languages-length:1304 X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 11 Jan 2019 11:48:23 +0000 Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id E5B13AE54; Fri, 11 Jan 2019 11:48:05 +0000 (UTC) Date: Fri, 11 Jan 2019 12:48:26 +0100 From: Tom de Vries To: gcc-patches@gcc.gnu.org Cc: Thomas Schwinge Subject: [committed][nvptx, testsuite, openacc, libgomp] Add insufficient-resources.c Message-ID: <20190111114824.GA25400@delia> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-IsSubscribed: yes Hi, Add a test-case that tests the "insufficient resources" fatal in the nvptx libgomp plugin. Committed to trunk. Thanks, - Tom [nvptx, testsuite, openacc, libgomp] Add insufficient-resources.c 2019-01-11 Tom de Vries * testsuite/libgomp.oacc-c-c++-common/insufficient-resources.c: New test. --- .../insufficient-resources.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/insufficient-resources.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/insufficient-resources.c new file mode 100644 index 00000000000..b59cd420785 --- /dev/null +++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/insufficient-resources.c @@ -0,0 +1,21 @@ +/* { dg-set-target-env-var "GOMP_OPENACC_DIM" ":33:" } */ +/* { dg-shouldfail "" { openacc_nvidia_accel_selected } } */ + +#include +#include + +int +main (void) +{ +#pragma acc parallel vector_length (32) + { +#pragma acc loop worker + for (unsigned int i = 0; i < 32; i++) +#pragma acc loop vector + for (unsigned int j = 0; j < 64; j++) + ; + } + + return 0; +} +/* { dg-output "The Nvidia accelerator has insufficient resources" { target openacc_nvidia_accel_selected } } */