From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com [68.232.137.252]) by sourceware.org (Postfix) with ESMTPS id 501233858D32; Tue, 13 Jun 2023 10:42:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 501233858D32 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="6.00,239,1681200000"; d="scan'208,223";a="8659820" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa4.mentor.iphmx.com with ESMTP; 13 Jun 2023 02:42:41 -0800 IronPort-SDR: 7nsuX2mUp3fNw6x4cnwrUSRpaq1XUGbGk3qEm2TyBQALjsLi+8lDaSy5NIIj07CnyimLqtMn7s xb1M5FaB36nxzn4vWRCkurbkBlM+4n8BO627+NnH78rD1jIKe7qDtHBkUvyyO7OZ/+U5zLKJvg t5mjEWFKVfj/Durc2jUBrYJZGiqm5vlwCdV5CCy8B8wjcYpRtu2GeBfD2fctHc2M39l/Ofyvba tgKGj6xFEp7HqhY5bA8E48xSG0DaS7m5/D8xMoWfzFyB1PtgQQuFq5c7jZfmKL7D2mo/xXwrqP c8Y= From: Thomas Schwinge To: , , Jakub Jelinek , Tobias Burnus Subject: [ping] Add 'libgomp.{,oacc-}fortran/fortran-torture_execute_math.f90' In-Reply-To: <87cz2aqezb.fsf@euler.schwinge.homeip.net> References: <87cz2aqezb.fsf@euler.schwinge.homeip.net> User-Agent: Notmuch/0.29.3+94~g74c3f1b (https://notmuchmail.org) Emacs/28.2 (x86_64-pc-linux-gnu) Date: Tue, 13 Jun 2023 12:42:34 +0200 Message-ID: <87ttvb7ied.fsf@euler.schwinge.homeip.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-11.mgc.mentorg.com (139.181.222.11) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) 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,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --=-=-= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi! On 2023-06-05T14:18:48+0200, I wrote: > OK to push the attached > "Add 'libgomp.{,oacc-}fortran/fortran-torture_execute_math.f90'"? Ping. Gr=C3=BC=C3=9Fe Thomas ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstra=C3=9Fe 201= , 80634 M=C3=BCnchen; Gesellschaft mit beschr=C3=A4nkter Haftung; Gesch=C3= =A4ftsf=C3=BChrer: Thomas Heurung, Frank Th=C3=BCrauf; Sitz der Gesellschaf= t: M=C3=BCnchen; Registergericht M=C3=BCnchen, HRB 106955 --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename="0001-Add-libgomp.-oacc-fortran-fortran-torture_execute_ma.patch" >From 0d5095d8cd2d68113890a39a7fdb649198e576c1 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Fri, 2 Jun 2023 23:11:00 +0200 Subject: [PATCH] Add 'libgomp.{,oacc-}fortran/fortran-torture_execute_math.f90' gcc/testsuite/ * gfortran.fortran-torture/execute/math.f90: Enhance for optional OpenACC, OpenMP 'target' usage. libgomp/ * testsuite/libgomp.fortran/fortran-torture_execute_math.f90: New. * testsuite/libgomp.oacc-fortran/fortran-torture_execute_math.f90: Likewise. --- .../gfortran.fortran-torture/execute/math.f90 | 23 +++++++++++++++++-- .../fortran-torture_execute_math.f90 | 4 ++++ .../fortran-torture_execute_math.f90 | 5 ++++ 3 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 libgomp/testsuite/libgomp.fortran/fortran-torture_execute_math.f90 create mode 100644 libgomp/testsuite/libgomp.oacc-fortran/fortran-torture_execute_math.f90 diff --git a/gcc/testsuite/gfortran.fortran-torture/execute/math.f90 b/gcc/testsuite/gfortran.fortran-torture/execute/math.f90 index 17cc78f7a10..e71f669304f 100644 --- a/gcc/testsuite/gfortran.fortran-torture/execute/math.f90 +++ b/gcc/testsuite/gfortran.fortran-torture/execute/math.f90 @@ -1,9 +1,14 @@ ! Program to test mathematical intrinsics + +! See also 'libgomp/testsuite/libgomp.fortran/fortran-torture_execute_math.f90'; thus the '!$omp' directives. +! See also 'libgomp/testsuite/libgomp.oacc-fortran/fortran-torture_execute_math.f90'; thus the '!$acc' directives. + subroutine dotest (n, val4, val8, known) implicit none real(kind=4) val4, known real(kind=8) val8 integer n + !$acc routine seq if (abs (val4 - known) .gt. 0.001) STOP 1 if (abs (real (val8, kind=4) - known) .gt. 0.001) STOP 2 @@ -14,17 +19,20 @@ subroutine dotestc (n, val4, val8, known) complex(kind=4) val4, known complex(kind=8) val8 integer n + !$acc routine seq + if (abs (val4 - known) .gt. 0.001) STOP 3 if (abs (cmplx (val8, kind=4) - known) .gt. 0.001) STOP 4 end subroutine -program testmath +subroutine testmath implicit none real(kind=4) r, two4, half4 real(kind=8) q, two8, half8 complex(kind=4) cr complex(kind=8) cq external dotest, dotestc + !$acc routine seq two4 = 2.0 two8 = 2.0_8 @@ -96,5 +104,16 @@ program testmath cq = log ((-1.0_8, -1.0_8)) call dotestc (21, cr, cq, (0.3466, -2.3562)) -end program +end subroutine +program main + implicit none + external testmath + + !$acc serial + !$omp target + call testmath + !$acc end serial + !$omp end target + +end program diff --git a/libgomp/testsuite/libgomp.fortran/fortran-torture_execute_math.f90 b/libgomp/testsuite/libgomp.fortran/fortran-torture_execute_math.f90 new file mode 100644 index 00000000000..3348a0bb3ad --- /dev/null +++ b/libgomp/testsuite/libgomp.fortran/fortran-torture_execute_math.f90 @@ -0,0 +1,4 @@ +! { dg-do run } +! { dg-additional-options -foffload-options=-lm } + +include '../../../gcc/testsuite/gfortran.fortran-torture/execute/math.f90' diff --git a/libgomp/testsuite/libgomp.oacc-fortran/fortran-torture_execute_math.f90 b/libgomp/testsuite/libgomp.oacc-fortran/fortran-torture_execute_math.f90 new file mode 100644 index 00000000000..1b2ac440762 --- /dev/null +++ b/libgomp/testsuite/libgomp.oacc-fortran/fortran-torture_execute_math.f90 @@ -0,0 +1,5 @@ +! { dg-do run } +!TODO { dg-prune-output {using 'vector_length \(32\)', ignoring 1} } +! { dg-additional-options -foffload-options=-lm } + +include '../../../gcc/testsuite/gfortran.fortran-torture/execute/math.f90' -- 2.34.1 --=-=-=--