From patchwork Wed Apr 8 17:57:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Li, Pan2 via Gcc-patches" X-Patchwork-Id: 1268193 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gcc.gnu.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=SD1pxcZw; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48yBp50Xf5z9sQx for ; Thu, 9 Apr 2020 03:58:02 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 63A103887030; Wed, 8 Apr 2020 17:58:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 63A103887030 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1586368680; bh=l5YbSAgrPwa+AbGrLuIY0WgB0ZTvM+faJaqHbwmxbFw=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=SD1pxcZw76FDYxHfIHgTL2d6qN+jJ9JFajebJWeNtj/RwR7TloammT89oEYLn6et7 WPB8l8/+SXvMtZ7g/RYTeizBsNGMoQGsqHcR/4sEBkLj83/ng8n33j/cdB+AW7I7Vi wg+slclW9ldydLdQW7myll2LmGplrl4vFX9l+028= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by sourceware.org (Postfix) with ESMTP id E5A2C388700B for ; Wed, 8 Apr 2020 17:57:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E5A2C388700B Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-435-Xw9IvLLrNi2H9NyTZeqhuA-1; Wed, 08 Apr 2020 13:57:55 -0400 X-MC-Unique: Xw9IvLLrNi2H9NyTZeqhuA-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9BBC78017F3; Wed, 8 Apr 2020 17:57:54 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-112-28.ams2.redhat.com [10.36.112.28]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 058C3C0D98; Wed, 8 Apr 2020 17:57:53 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id 038Hvp2G022918; Wed, 8 Apr 2020 19:57:51 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id 038HvoHe022917; Wed, 8 Apr 2020 19:57:50 +0200 Date: Wed, 8 Apr 2020 19:57:50 +0200 To: Tobias Burnus Subject: [committed] openacc: Fix up declare-pr94120.C testcase [PR94533] Message-ID: <20200408175750.GJ2212@tucnak> References: <0e98c5c9-7536-e11f-c42e-4e8060b147a5@codesourcery.com> MIME-Version: 1.0 In-Reply-To: <0e98c5c9-7536-e11f-c42e-4e8060b147a5@codesourcery.com> User-Agent: Mutt/1.11.3 (2019-02-01) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-26.1 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Jakub Jelinek via Gcc-patches From: "Li, Pan2 via Gcc-patches" Reply-To: Jakub Jelinek Cc: gcc-patches , Thomas Schwinge Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" Hi! On Wed, Mar 11, 2020 at 02:28:44PM +0100, Tobias Burnus wrote: > gcc/testsuite/ > PR middle-end/94120 > * c-c++-common/goacc/declare-pr94120.c: New. > * g++.dg/declare-pr94120.C: New. This test has been put in a wrong directory, where OpenACC tests aren't tested with -fopenacc, and also contained trailing semicolons. I've moved it where it belongs, added dg-error directives and removed the extra semicolons. Tested on x86_64-linux, committed to trunk as obvious. 2020-04-08 Jakub Jelinek PR middle-end/94120 PR testsuite/94533 * g++.dg/declare-pr94120.C: Move test to ... * g++.dg/goacc/declare-pr94120.C: ... here. Add dg-error directives. Remove semicolons after } at the end of namespaces. Jakub diff --git a/gcc/testsuite/g++.dg/declare-pr94120.C b/gcc/testsuite/g++.dg/goacc/declare-pr94120.C similarity index 60% rename from gcc/testsuite/g++.dg/declare-pr94120.C rename to gcc/testsuite/g++.dg/goacc/declare-pr94120.C index 8515c4ff875..7aa56121e38 100644 --- a/gcc/testsuite/g++.dg/declare-pr94120.C +++ b/gcc/testsuite/g++.dg/goacc/declare-pr94120.C @@ -8,23 +8,23 @@ int b[8]; namespace my { int d[8] = { 1, 2, 3, 4, 5, 6, 7, 8 }; #pragma acc declare copyin (d) -}; +} namespace outer { namespace inner { int e[8] = { 1, 2, 3, 4, 5, 6, 7, 8 }; #pragma acc declare copyin (e) - }; -}; + } +} int f[8] = { 1, 2, 3, 4, 5, 6, 7, 8 }; namespace my { - #pragma acc declare copyin (f) -}; + #pragma acc declare copyin (f) /* { dg-error "'f' must be a variable declared in the same scope as '#pragma acc declare'" } */ +} namespace outer { int g[8] = { 1, 2, 3, 4, 5, 6, 7, 8 }; namespace inner { - #pragma acc declare copyin (g) - }; -}; + #pragma acc declare copyin (g) /* { dg-error "'outer::g' must be a variable declared in the same scope as '#pragma acc declare'" } */ + } +}