From patchwork Thu Oct 19 19:48:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tobias Burnus X-Patchwork-Id: 1852077 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.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 ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SBJDx6bZHz23jM for ; Fri, 20 Oct 2023 06:48:49 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 840A3385840A for ; Thu, 19 Oct 2023 19:48:47 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com [68.232.137.180]) by sourceware.org (Postfix) with ESMTPS id 612F63858D33; Thu, 19 Oct 2023 19:48:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 612F63858D33 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 612F63858D33 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=68.232.137.180 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697744909; cv=none; b=wwV8p0TGnP88eKdP0skrnQ42bm8Yna0IUOVSSzPWPqlF5sCM9SjuDyAuYtErMR3QfLGtPDGy6A/gUzOv+c+q7Q1rLA0ynY+qabNJiMNLP0jexlwPGhDl4EiwrOkfZon1oJSWjuPbhNVr525B26tfRBu02aWTP6KFbHj82SKU3xY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697744909; c=relaxed/simple; bh=HPR+x/8qLLfyQZQCt9kIwsPKOlavSjGyqcfCksbFJ90=; h=Message-ID:Date:MIME-Version:To:From:Subject; b=chMO4tRSN3m3oOWuAJ0GxYHFxgKAPN9XLa8Hw/ddD4kQVb99PC5k+BjllUX3tCa/vW+W+EJpca7tyDt3VcGLbidcrkFdhib7wEiXKC6hjNGXVM5TPyAtVhXxOseuOxB4T+Y2mzP2K4WffRp6WO6yw+BCxmcmBJDd2OjnFUaVROU= ARC-Authentication-Results: i=1; server2.sourceware.org X-CSE-ConnectionGUID: ZGJOQBjBQLmd27lQzcenYw== X-CSE-MsgGUID: zwl/A9QYSGCHyfpgYFmqkQ== X-IronPort-AV: E=Sophos;i="6.03,238,1694764800"; d="diff'?scan'208";a="20159114" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa3.mentor.iphmx.com with ESMTP; 19 Oct 2023 11:48:23 -0800 IronPort-SDR: 9Jr+g26RAlztZpYHaiWMN4mJARcL094tr8pk3ZlnObPIOlrqa8diJ1/R/+yMne271tvjgN1KSk pVbVc3sm01/kpbMY8Z2TFLGVuv/sp3J7CGIAfyCgPKkxTDM/HOVNqqAG9DemAYkeKBo325IFn2 5ammDrKipN84DZRPgIqPyUonZFH2P5TiUh7jss+rzshZkSezHjg4wV0zt6b07iPvkpxfB0dsZh uzXYm4om/xjpmiQ3fPgk+SBsUp3Qx9/ZyjzfyuvNzREYoQwZXUX0QNwC1pltiJErO/1FsW4kBh 7mk= Message-ID: <17133bf5-db9d-406f-b39d-265fe64f90af@codesourcery.com> Date: Thu, 19 Oct 2023 21:48:18 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: gcc-patches , fortran From: Tobias Burnus Subject: [Patch] omp_lib.f90.in: Deprecate omp_lock_hint_* for OpenMP 5.0 X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) To svr-ies-mbx-12.mgc.mentorg.com (139.181.222.12) X-Spam-Status: No, score=-11.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, KAM_NUMSUBJECT, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org I noticed that we only tagged half of the 5.0 deprecations in the omp_lib module; this added the other half. (omp_lock_hint_* was renamed to omp_sync_hint_*.) Currently, this patch has has no visible effect - but once we bump the OpenMP version from 4.5 to 5.0, there will warnings of the those. Comments, remarks? If not, I will commit the attached patch tomorrow. Tobias PS: Once the OpenMP version has been bumped (as done for testing), the warning looks as follows: 1 | use omp_lib | 1 Warning: Using parameter ‘omp_lock_hint_kind’ declared at (1) is deprecated [-Wdeprecated-declarations] 3 | print *, omp_get_nested() | 1 Warning: Using function ‘omp_get_nested’ at (1) is deprecated [-Wdeprecated-declarations] The 'omp_lock_hint_kind' warning is not ideal as it uses the declared-at location and not the first-used location, which would be in line 2: integer(omp_lock_hint_kind) :: hint ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955 omp_lib.f90.in: Deprecate omp_lock_hint_* for OpenMP 5.0 The omp_lock_hint_* parameters were deprecated in favor of omp_sync_hint_*. While omp.h contained deprecation markers for those, the omp_lib module only contained them for omp_{g,s}_nested. Note: The -Wdeprecated-declarations warning will only become active once openmp_version / _OPENMP is bumped from 201511 (4.5) to 201811 (5.0). libgomp/ChangeLog: * omp_lib.f90.in: Tag omp_lock_hint_* as being deprecated when _OPENMP >= 201811. diff --git a/libgomp/omp_lib.f90.in b/libgomp/omp_lib.f90.in index e4515271252..755c0bf16ec 100644 --- a/libgomp/omp_lib.f90.in +++ b/libgomp/omp_lib.f90.in @@ -904,6 +904,10 @@ #if _OPENMP >= 201811 !GCC$ ATTRIBUTES DEPRECATED :: omp_get_nested, omp_set_nested +!GCC$ ATTRIBUTES DEPRECATED :: omp_lock_hint_kind, omp_lock_hint_none +!GCC$ ATTRIBUTES DEPRECATED :: omp_lock_hint_uncontended, omp_lock_hint_contended +!GCC$ ATTRIBUTES DEPRECATED :: omp_lock_hint_nonspeculative +!GCC$ ATTRIBUTES DEPRECATED :: omp_lock_hint_speculative #endif #if _OPENMP >= 202011