From patchwork Tue Mar 28 21:06:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 76263 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2505210vqo; Tue, 28 Mar 2023 14:07:50 -0700 (PDT) X-Google-Smtp-Source: AKy350bSsHS6I2xqrLHt3GwWMhctxG5C+DMXnWLwbsx5CFTQWjLk3N8g3fMg3gjH/i1T7LzXt/xu X-Received: by 2002:aa7:d54f:0:b0:502:3376:7872 with SMTP id u15-20020aa7d54f000000b0050233767872mr13386430edr.35.1680037670165; Tue, 28 Mar 2023 14:07:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680037670; cv=none; d=google.com; s=arc-20160816; b=VMtedoeXfOe8ApvyHGQwVgVlqYd/T3AFUydG+c1GC4WZWVeFX/mTPmHLy4Ez86mszu 677/tlFjpTwRb6zxA8QGVT4F48p5qIxPLz3kqtScPYlwd0gm1LJbIcH92d/uYHZVbcJw kRNh8TelprxKT8c7wmcFbqzqvJKLpZTKSBgy4ZdqQd+f3in1Z96lwWoLtvY8p38yikIa my0tQJmtKxzJyter1yalxgNQAKNqlSIoq6hBP9izbqDJT4W55Sm4/H2tQStz/IkeVcFW 2R2zDV3RA/GflChZB6yNQXC/TXMwwGXoiBK0D0uEqguon6TVsGXHWhcJhaqmVlAjO1Yx PzKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mime-version:message-id:date :user-agent:references:in-reply-to:subject:cc:to:from:ironport-sdr :dmarc-filter:delivered-to; bh=lwcqRhdX+Th70ImSz8ITiPatCupeCXUYL23qyUeNETs=; b=W4c8bcTLGZLPOJAfNP1Rg+3Sz/hXuMP2lzFsfVZFH/jdf8buhHVvPiwZymKfcvvaVE TwNbTnRexVtixDxaa8/sIZwkvk050718QmryH27PAWrgJbMES+An0fDB8u9Bcyc/su0b PuAHZcHHyhSx/mlxJtu31GdcrbVGpmOMEpMQiGh8SIJwUWYqc7Tlmuz5+rGyCEKnnMJg 2O6rcWj8+8cAOIthnh+E4edCOYSBRFMZU3rYa3heERk+tKo6Pxh+yVC5/Y4xYAzkFk3A smm4gRJd2eZAKNWnZhWGIwMBqits0bkT3bmN7J5T4iHw/B3zh18SzQ7UeZSFk//8GT+f Gxvw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id dd10-20020a1709069b8a00b0093defbd6288si14349296ejc.1039.2023.03.28.14.07.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Mar 2023 14:07:50 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c 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 CE51A3851143 for ; Tue, 28 Mar 2023 21:07:26 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id A92223858296 for ; Tue, 28 Mar 2023 21:06:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A92223858296 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=mentor.com Received: from esa1.mentor.iphmx.com ([68.232.129.153]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1phGWq-00042y-Ug for gcc-patches@gnu.org; Tue, 28 Mar 2023 17:06:54 -0400 X-IronPort-AV: E=Sophos;i="5.98,297,1673942400"; d="scan'208,223";a="797474" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa1.mentor.iphmx.com with ESMTP; 28 Mar 2023 13:06:47 -0800 IronPort-SDR: TuMOGaMDWX1q9tigfhZVE/LGvqcCDGsxfRBxJNwvwkIHIbmRYN/MgvnYyZPSDU3DPX52mHm+iV C1Z0TaqESD5OLx2oNI4BpW8f0TuF9rYA98pXvTALFOcqvasqyyXjqSWtGTXMyYBO+pFYSmtJP5 oqVKNMCmcc1/sLkhuu/y+bCEJU5QFuBqePSgo0dL5yM1HydtqKnz/CxMjG4UQmV4Kn3x26jz2k N0p79fIZ9m/Hehz6+Pg5PEr7oKY1x3wDVq84wcB86GTRNq+3W4rgqxClzHp7MfQW5LctL55wQd cCg= From: Thomas Schwinge To: Rimvydas Jasinskas , , CC: Harald Anlauf , Tom de Vries Subject: Enable 'gfortran.dg/weak-2.f90' for nvptx target (was: Support for WEAK attribute, part 2) In-Reply-To: References: <0115618b-059b-fd11-a813-33374f16af78@gmx.de> <87h6vo8u8u.fsf@euler.schwinge.homeip.net> <1d59f51b-fffc-3a3a-4c92-edfe5c525783@gmx.de> User-Agent: Notmuch/0.29.3+94~g74c3f1b (https://notmuchmail.org) Emacs/28.2 (x86_64-pc-linux-gnu) Date: Tue, 28 Mar 2023 23:06:34 +0200 Message-ID: <87pm8s8u1x.fsf@euler.schwinge.homeip.net> MIME-Version: 1.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-10.mgc.mentorg.com (139.181.222.10) Received-SPF: pass client-ip=68.232.129.153; envelope-from=Thomas_Schwinge@mentor.com; helo=esa1.mentor.iphmx.com X-Spam_score_int: -39 X-Spam_score: -4.0 X-Spam_bar: ---- X-Spam_report: (-4.0 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Status: No, score=-48.4 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, TXREP, T_SPF_PERMERROR autolearn=unavailable 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.29 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 Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761647179809749220?= X-GMAIL-MSGID: =?utf-8?q?1761647179809749220?= Hi! On 2023-02-24T07:16:51+0200, Rimvydas Jasinskas via Fortran wrote: > From 5b83226c714b17780334b5bad9b17c2266af8232 Mon Sep 17 00:00:00 2001 > From: Rimvydas Jasinskas > Date: Fri, 24 Feb 2023 04:41:00 +0000 > Subject: Fortran: Add support for WEAK attribute for variables > > Add the rest of the weak-*.f90 testcases. > --- /dev/null > +++ b/gcc/testsuite/gfortran.dg/weak-2.f90 > @@ -0,0 +1,26 @@ > +! { dg-do compile } > +! { dg-require-weak "" } > +! { dg-skip-if "" { x86_64-*-mingw* } } > +! { dg-skip-if "" { nvptx-*-* } } > +[...] Pushed to master branch commit b3c5933ee726004e4e47291d422dfe7ac3345062 "Enable 'gfortran.dg/weak-2.f90' for nvptx target", see attached. I'm sorry I've not yet been able to look into the other items discussed in this thread. Grüße Thomas ----------------- 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 From b3c5933ee726004e4e47291d422dfe7ac3345062 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Tue, 28 Mar 2023 22:26:30 +0200 Subject: [PATCH] Enable 'gfortran.dg/weak-2.f90' for nvptx target Follow-up to commit bcbeebc498126c50d73809ec8a4bd0bff27ee97b "Fortran: Add support for WEAK attribute for variables". gcc/testsuite/ * gfortran.dg/weak-2.f90: Enable for nvptx target. --- gcc/testsuite/gfortran.dg/weak-2.f90 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/gcc/testsuite/gfortran.dg/weak-2.f90 b/gcc/testsuite/gfortran.dg/weak-2.f90 index 3e0e877e903..ab273a13b6c 100644 --- a/gcc/testsuite/gfortran.dg/weak-2.f90 +++ b/gcc/testsuite/gfortran.dg/weak-2.f90 @@ -1,10 +1,10 @@ ! { dg-do compile } ! { dg-require-weak "" } ! { dg-skip-if "" { x86_64-*-mingw* } } -! { dg-skip-if "" { nvptx-*-* } } ! 1. -! { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?__foo_MOD_abc" } } +! { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?__foo_MOD_abc" { target { ! nvptx-*-* } } } } +! { dg-final { scan-assembler-times "\\.weak \\.global \\.align 4 \\.u32 __foo_MOD_abc" 1 { target nvptx-*-* } } } module foo implicit none !GCC$ ATTRIBUTES weak :: abc @@ -12,14 +12,16 @@ real :: abc(7) end module ! 2. -! { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?impl1" } } +! { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?impl1" { target { ! nvptx-*-* } } } } +! { dg-final { scan-assembler-times "\\.weak \\.func \\(\\.param\\.u32 %value_out\\) impl1" 2 { target nvptx-*-* } } } integer function impl1() implicit none !GCC$ ATTRIBUTES weak :: impl1 end function ! 3. -! { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?bar__" } } +! { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?bar__" { target { ! nvptx-*-* } } } } +! { dg-final { scan-assembler-times "\\.weak \\.func \\(\\.param\\.u32 %value_out\\) bar__" 2 { target nvptx-*-* } } } integer function impl2() bind(c,name='bar__') implicit none !GCC$ ATTRIBUTES weak :: impl2 -- 2.25.1