From patchwork Wed Jun 23 20:15:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tobias Burnus X-Patchwork-Id: 1496272 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=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (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 4G9Dzh5vC4z9sW6 for ; Thu, 24 Jun 2021 06:15:59 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 30A07383542A for ; Wed, 23 Jun 2021 20:15:57 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from esa1.mentor.iphmx.com (esa1.mentor.iphmx.com [68.232.129.153]) by sourceware.org (Postfix) with ESMTPS id 897B4385800F; Wed, 23 Jun 2021 20:15:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 897B4385800F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com IronPort-SDR: 6lsui4nFEfAxjW6g2c10bVasv4WLU1FY2OGJR09JYasvhX/+/tFx1jDu1383qYpG5pqu35u802 LImHv9vhpdDFgtNC3Mnfj/Oo6eXOlPkjF6DXnRBHxgPXc1qrN4W9fx/Xol8kcdlrRfPhqu/Kzp b3O7aLeQpxxwMRhp6woy9KVtv7cfgI7cX8ffxdOhaGmpnxiQCNgp88hgNiPkdR6u3IODbbmkWH bxn6kmBf+dA+Ti+VWBXOYK6SImqpToVGyx9SnPfEuiPmgzx95xMl41BotV+gT6yY+7RylQElJf Nlg= X-IronPort-AV: E=Sophos;i="5.83,294,1616486400"; d="diff'?scan'208";a="65172086" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa1.mentor.iphmx.com with ESMTP; 23 Jun 2021 12:15:34 -0800 IronPort-SDR: mgsy/fjR37neQWPm2enwgcTG8tPSwJNGWBP16FOpCaXM5wQndybICaqevQvabBxupU7ELB9GAj CeMFZO0tUGvhWNfMUPlSJY6kYGMRN7Wn+yhL2TvTcpYT9uJIqzqSFsuFVke3RygBWQ3K1ywv2g nm6uoMqo5jEczk8jVZ5uZyLwgCtD300onhY3kSGGT0xAb6DrJjizXuxKkWTGVtfo1WWgwqdfUQ BdFGw9YRSUZ4Dftm5Ms83xoeS4Lu4pmuVhF2GvDk9xQ+AGnTG2sDDywwX0U3ymYeRVLLTpmaz2 wR0= Subject: [committed] fortran/dump-parse-tree.c: Use proper enum type (was: Re: [Patch ]Fortran/OpenMP: Extend defaultmap clause for OpenMP 5 [PR92568]) To: =?utf-8?q?Martin_Li=C5=A1ka?= , Jakub Jelinek References: <90ebbf24-6d0f-7964-0586-e5fc4f615b40@codesourcery.com> <20210614161812.GH7746@tucnak> <29cd1f01-c8f5-a10b-48bd-bc82810a26ee@suse.cz> From: Tobias Burnus Message-ID: <8f5b5912-14c7-b104-39b0-f886412b1c3a@codesourcery.com> Date: Wed, 23 Jun 2021 22:15:27 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <29cd1f01-c8f5-a10b-48bd-bc82810a26ee@suse.cz> Content-Language: en-US X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-05.mgc.mentorg.com (139.181.222.5) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, 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: , Cc: gcc-patches , fortran Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" Indeed, I somehow managed to use the wrong of the two enums in the cast ... Fixed in r12-1760-gcac3527793b38164e2a83c7ccbfe0cfcf5ac95b8 On 23.06.21 16:13, Martin Liška wrote: > I noticed the patch causes the following clang warnings: > gcc/fortran/dump-parse-tree.c:1786:11: warning: comparison of > different enumeration types in switch statement ('enum > gfc_omp_defaultmap' and 'gfc_omp_defaultmap_category') > [-Wenum-compare-switch] Thanks for reporting! Tobias ----------------- Mentor Graphics (Deutschland) GmbH, Arnulfstrasse 201, 80634 München Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Frank Thürauf commit cac3527793b38164e2a83c7ccbfe0cfcf5ac95b8 Author: Tobias Burnus Date: Wed Jun 23 22:10:43 2021 +0200 fortran/dump-parse-tree.c: Use proper enum type gcc/fortran/ChangeLog: * dump-parse-tree.c (show_omp_clauses): Fix enum type used for dumping gfc_omp_defaultmap_category. diff --git a/gcc/fortran/dump-parse-tree.c b/gcc/fortran/dump-parse-tree.c index 07e98b7e30d..26841eefb7d 100644 --- a/gcc/fortran/dump-parse-tree.c +++ b/gcc/fortran/dump-parse-tree.c @@ -1781,7 +1781,7 @@ show_omp_clauses (gfc_omp_clauses *omp_clauses) if (i != OMP_DEFAULTMAP_CAT_UNCATEGORIZED) { fputc (':', dumpfile); - switch ((enum gfc_omp_defaultmap) i) + switch ((enum gfc_omp_defaultmap_category) i) { case OMP_DEFAULTMAP_CAT_SCALAR: dfltmap = "SCALAR"; break; case OMP_DEFAULTMAP_CAT_AGGREGATE: dfltmap = "AGGREGATE"; break;