From patchwork Tue Feb 6 22:45:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 870141 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-472716-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="kzVwRjqa"; 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 3zbfh70PPTz9s72 for ; Wed, 7 Feb 2018 09:46:14 +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 :subject:from:to:cc:references:message-id:date:mime-version :in-reply-to:content-type; q=dns; s=default; b=n529PKIebaHEN2cmE VyUXSeDm4fU3oGECQQ1/lkdQHgSZKKhx17jMk65eBQcxPkrvGWV7+7FJP83kFe7p bHR2pkopLeZn1s9/ZrAMtBghW75Ru+7soJw9L3dlbGAfYNyUQCssjTRToZY7n9yu Sg2OYxCqHwVsFsPJo4so5J9L38= 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 :subject:from:to:cc:references:message-id:date:mime-version :in-reply-to:content-type; s=default; bh=7RLTCxUf8yiQOgurRqUhB4J 1mbU=; b=kzVwRjqaOscNzgM115Hzs9Rp7tvpostf04+UbMgVSr9HKwzyqkL9S2r XkTBOpm09Qya0jQZTQShDGryI1jF7u+87Zu8Z7nLMfPpLVCQEka3fXqy8QnMO1Bj f1l9RPzQW5cuCz69GXsxNH7eWfXVURHckRV58ihUUc0azoe0cLK4= Received: (qmail 66131 invoked by alias); 6 Feb 2018 22:46:06 -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 65889 invoked by uid 89); 6 Feb 2018 22:46:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.8 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS, URIBL_RED autolearn=ham version=3.3.2 spammy=H*Ad:U*thomas X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 06 Feb 2018 22:46:03 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-MBX-04.mgc.mentorg.com) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1ejC00-0001pf-TJ from Tom_deVries@mentor.com ; Tue, 06 Feb 2018 14:46:00 -0800 Received: from [172.30.64.70] (137.202.0.87) by SVR-IES-MBX-04.mgc.mentorg.com (139.181.222.4) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Tue, 6 Feb 2018 22:45:56 +0000 Subject: [og7, committed] Fix implicit fallthrough warning in expand_omp_target From: Tom de Vries To: Cesar Philippidis CC: Jakub Jelinek , Alexander Monakov , Thomas Schwinge , "gcc-patches@gcc.gnu.org" References: <7bfb59de-a141-46b4-0c6d-91ecd5b2a766@codesourcery.com> Message-ID: <24ae2bbe-99b2-5c10-1f13-eba50e6f2856@mentor.com> Date: Tue, 6 Feb 2018 23:45:55 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To SVR-IES-MBX-04.mgc.mentorg.com (139.181.222.4) [ was: Re: [PATCH,WIP] Use functional parameters for data mappings in OpenACC child functions ] On 02/06/2018 12:46 PM, Tom de Vries wrote: > On 12/21/2017 10:46 PM, Cesar Philippidis wrote: > >> I've committed this patch to openacc-gcc-7-branch. > >> diff --git a/gcc/omp-expand.c b/gcc/omp-expand.c >> index bf1f127d8d6..f674c74ec82 100644 >> --- a/gcc/omp-expand.c >> +++ b/gcc/omp-expand.c > >>     offloaded = is_gimple_omp_offloaded (entry_stmt); >>     switch (gimple_omp_target_kind (entry_stmt)) >>       { >> +    case GF_OMP_TARGET_KIND_OACC_PARALLEL: >> +      oacc_parallel = true; >>       case GF_OMP_TARGET_KIND_REGION: >>       case GF_OMP_TARGET_KIND_UPDATE: >>       case GF_OMP_TARGET_KIND_ENTER_DATA: >>       case GF_OMP_TARGET_KIND_EXIT_DATA: >> -    case GF_OMP_TARGET_KIND_OACC_PARALLEL: >>       case GF_OMP_TARGET_KIND_OACC_KERNELS: >>       case GF_OMP_TARGET_KIND_OACC_UPDATE: >>       case GF_OMP_TARGET_KIND_OACC_ENTER_EXIT_DATA: > > This broke openacc-gcc-7-branch bootstrap: > ... > gcc/omp-expand.c: In function 'void expand_omp_target(omp_region*)': > gcc/omp-expand.c:7110:21: error: this statement may fall through > [-Werror=implicit-fallthrough=] >        oacc_parallel = true; >        ~~~~~~~~~~~~~~^~~~~~ > gcc/omp-expand.c:7111:5: note: here >      case GF_OMP_TARGET_KIND_REGION: >      ^~~~ > ... Fixed in attached patch. Committed. Thanks, - Tom Fix implicit fallthrough warning in expand_omp_target 2018-02-06 Tom de Vries * omp-expand.c (expand_omp_target): Fix implicit fallthrough warning. --- gcc/omp-expand.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/omp-expand.c b/gcc/omp-expand.c index f674c74..d6ddf6e 100644 --- a/gcc/omp-expand.c +++ b/gcc/omp-expand.c @@ -7108,6 +7108,7 @@ expand_omp_target (struct omp_region *region) { case GF_OMP_TARGET_KIND_OACC_PARALLEL: oacc_parallel = true; + gcc_fallthrough (); case GF_OMP_TARGET_KIND_REGION: case GF_OMP_TARGET_KIND_UPDATE: case GF_OMP_TARGET_KIND_ENTER_DATA: