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: 155696 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2010:b0:403:3b70:6f57 with SMTP id fe16csp615944vqb; Thu, 19 Oct 2023 12:49:00 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFxQJ+Zojz9pWTQgFcmg3xRSC/g5rKhlaYiNC14Ls8rcHT423mgtmc8uLlTCUG1KhPHK2WO X-Received: by 2002:a9d:784b:0:b0:6b9:8ea6:fbc2 with SMTP id c11-20020a9d784b000000b006b98ea6fbc2mr3360366otm.27.1697744939934; Thu, 19 Oct 2023 12:48:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1697744939; cv=pass; d=google.com; s=arc-20160816; b=EKi270Zp76QjSci9bZlXvJtYBClaIp1PjziztqPnhWDSXQR/DFYE2ygHZVMHXzv2Dw Q38ydsctSC85QRrvq7MPwEWD4ljYdj1BbWgbvnmEBFitwmiAUVfNYnl8uAjsZAi/YsOi nyz0OVvSjMoHG2jQN2jUOzNjNIKI6OqRQwdk4rJJox4yugBV6CVikqVPhp2GhWKugT8O 5mkwGq2/FGy5IO6LBv70gsZfQxHNIkTPFzdpcLTO3JNjkB6ztegM4F5afUlW5LGN2kMn hvuFJRts+4cpS5i+SRM7ELbaqn1fV39FUq0u4kPKr4F+2er/znWCDoAmB5kWE55qLzVy yKLg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:from:to :content-language:user-agent:mime-version:date:message-id :ironport-sdr:arc-filter:dmarc-filter:delivered-to; bh=5KCrlNqz9T0R8sYMwXrMFpCrZE8/mfg0GLACB3aIWqc=; fh=ARF5Mvhgv4mOzEi1LJHgn82UOzar4LOruqM9inFDcVw=; b=O/vLGnpQLeN8qtod+XWmaYDw6NcA7IaHY59jnC5nzcYcAVDHyJaFWBlaxsdCM13Zc2 PYO6L8WwFlFsge8a6ZTgAgDMerRZQyUTtHbmY0/3K0+yS2FyhXrg94SvSo7MGHsHMDIv sUOPaXMuCqgNTeguWGxMs5NPwVrHVV2irLa10dVODfKmFRbqnHOUfBi23mSecq2cZ5Sk 0IjNnms4stG3Ki6xC4m27NFexMKzrqGUoxHemMFmxDyK0LQeZO96K4iQa1psWnt3GntQ JRzCCxrtMif6P7Po/lsmpTEXyYarPagrIF+CUmN4D/NhJzTo/vEG50JG43SheAsYE2dR 2PPA== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id z13-20020a05620a08cd00b007759ca123b0si110513qkz.439.2023.10.19.12.48.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 12:48:59 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id AAE693858281 for ; Thu, 19 Oct 2023 19:48:59 +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+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780214597728785126 X-GMAIL-MSGID: 1780214597728785126 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