From patchwork Thu Jul 16 12:44:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tobias Burnus X-Patchwork-Id: 1330202 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@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=codesourcery.com 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 4B6v9J0j22z9sSt for ; Thu, 16 Jul 2020 22:45:08 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5C052388CC21; Thu, 16 Jul 2020 12:45:05 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com [68.232.137.252]) by sourceware.org (Postfix) with ESMTPS id 0CC22388A826 for ; Thu, 16 Jul 2020 12:45:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 0CC22388A826 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=Tobias_Burnus@mentor.com IronPort-SDR: 9bdi6Q6r0OrYRnsLZSWaWDcy4AuaezDLjCmocLY7WmAzGBAM7v039QXOmRvaMwFmBtYUIl5mPA 7uoPrm0V5b9b5ZjTldrjQI4q217a0l5auWcBG8cOqGSz5XhHtwpnzwK2hZbSphEnbBZFy+OqRI 5jsZQNdSN1Nf/q7rs9EOsid+vWSd6trzOxzIJ2eG2PTwti4AUQY1+w8E2OnlST7LIo7UOGCs9r EUN/HHI39+qqsxrySSkInj/pLWqriY1Yt6KgDflHXSXRC58YqJMIHbuK3Qm2fEWux0CZxbTVPD LyM= X-IronPort-AV: E=Sophos;i="5.75,359,1589270400"; d="diff'?scan'208";a="51099724" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa4.mentor.iphmx.com with ESMTP; 16 Jul 2020 04:44:52 -0800 IronPort-SDR: WdBrrzQP8Ooaeu4J4R0KvVV2IuCygCjDjZxOjcVO1TpB+MDzgZy6luRtfQxCPj2ld4lAicYWed mWIUhJ2WTQathvEugOxIq12xzkZPDPNU/F4zLRRTrY1zMmxtAnQ8ZEcDWLk8G6Rrvvsf1pIGa8 NXwViHM0nYdSWylAyqwnbWa/RN2s0ipejYQRNiigJrdOs3dyoubQqQJtGWt/QFBp36RL/M6l0m 6TFiQsMB4A7kEvsWzW2XHjFuEApAzCZHm7h7+u855BdkBWXyepTrzeVudgO6dF6oDFbEtPmW+g xzI= From: Tobias Burnus Subject: [Patch][OG10, committed] libgomp.oacc-fortran/firstprivate-int.f90 fix for nonexisting kind-16 int To: gcc-patches Message-ID: <6162dfcc-d1e1-41c1-89c2-5ff2053001be@codesourcery.com> Date: Thu, 16 Jul 2020 14:44:41 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 Content-Language: en-US X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: SVR-IES-MBX-04.mgc.mentorg.com (139.181.222.4) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-Spam-Status: No, score=-13.3 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: , Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" i386 (alias x86-64 with -m32) does not support integer(kind=16); this fix simply uses the highest available value in integer_kinds. This patch still assumes that all offload targets support at least those , but that seems to currently the case. Alternatively, one could operate with effective-target, but as this test copy checks data copying, the simple approach is sufficient. Committed to the OG10 (devel/omp/gcc-10) branch. Tobias ----------------- Mentor Graphics (Deutschland) GmbH, Arnulfstraße 201, 80634 München / Germany Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Alexander Walter commit b729ebe99cdbb21bb5afccecd0a284d00a66182d Author: Tobias Burnus Date: Thu Jul 16 14:37:23 2020 +0200 libgomp.oacc-fortran/firstprivate-int.f90 fix for nonexisting kind-16 int libgomp/ * testsuite/libgomp.oacc-fortran/firstprivate-int.f90: Use highest available integer kind instead of assuming that kind=16 exists. diff --git a/libgomp/ChangeLog.omp b/libgomp/ChangeLog.omp index db1e396b57f..64980dbc38a 100644 --- a/libgomp/ChangeLog.omp +++ b/libgomp/ChangeLog.omp @@ -1,3 +1,8 @@ +2020-07-16 Tobias Burnus + + * testsuite/libgomp.oacc-fortran/firstprivate-int.f90: Use + highest available integer kind instead of assuming that kind=16 exists. + 2020-07-15 Julian Brown * testsuite/libgomp.oacc-c-c++-common/broadcast-many.c: New test. diff --git a/libgomp/testsuite/libgomp.oacc-fortran/firstprivate-int.f90 b/libgomp/testsuite/libgomp.oacc-fortran/firstprivate-int.f90 index 3b148ce7517..abc175f37e3 100644 --- a/libgomp/testsuite/libgomp.oacc-fortran/firstprivate-int.f90 +++ b/libgomp/testsuite/libgomp.oacc-fortran/firstprivate-int.f90 @@ -3,19 +3,22 @@ ! { dg-do run } program test + use iso_fortran_env, only: integer_kinds implicit none integer (kind=1) :: i1i, i1o integer (kind=2) :: i2i, i2o integer (kind=4) :: i4i, i4o integer (kind=8) :: i8i, i8o - integer (kind=16) :: i16i, i16o +! Use highest-precision integer, which might be less than '16' +! assume integer_kinds == logical_kinds + integer (kind=maxval(integer_kinds)) :: i16i, i16o logical (kind=1) :: l1i, l1o logical (kind=2) :: l2i, l2o logical (kind=4) :: l4i, l4o logical (kind=8) :: l8i, l8o - logical (kind=16) :: l16i, l16o + logical (kind=maxval(integer_kinds)) :: l16i, l16o real (kind=4) :: r4i, r4o real (kind=8) :: r8i, r8o @@ -108,19 +111,20 @@ subroutine subtest(i1i, i2i, i4i, i8i, i16i, i1o, i2o, i4o, i8o, i16o, & l1i, l2i, l4i, l8i, l16i, l1o, l2o, l4o, l8o, l16o, & r4i, r8i, r4o, r8o, c4i, c8i, c4o, c8o, & ch1i, ch4i, ch1o, ch4o) + use iso_fortran_env, only: integer_kinds implicit none integer (kind=1) :: i1i, i1o integer (kind=2) :: i2i, i2o integer (kind=4) :: i4i, i4o integer (kind=8) :: i8i, i8o - integer (kind=16) :: i16i, i16o + integer (kind=maxval(integer_kinds)) :: i16i, i16o logical (kind=1) :: l1i, l1o logical (kind=2) :: l2i, l2o logical (kind=4) :: l4i, l4o logical (kind=8) :: l8i, l8o - logical (kind=16) :: l16i, l16o + logical (kind=maxval(integer_kinds)) :: l16i, l16o real (kind=4) :: r4i, r4o real (kind=8) :: r8i, r8o