From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com [68.232.137.180]) by sourceware.org (Postfix) with ESMTPS id CAFBE3858D32; Thu, 26 Oct 2023 16:49:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CAFBE3858D32 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 CAFBE3858D32 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=1698338973; cv=none; b=SnjIAMC8Rn1dCww9Dii6EN0oulpfdvuEUkb/rzgm5NAF21ZjOEEwV20OpMfylDik51cXgBd4/Jq8BYzNIy/u3YuKxILmJqn5C1g/CnyeoqBYafwkAD8KjrmMArPFq8OGoiyXoTVzpVQfwt6iV+3lRcFK9FMVLOdsszRQ2RzQkoI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698338973; c=relaxed/simple; bh=EIROg5MTNkMbE8bMi+7Yrxu9KNnFnpB+hcqlbCGBld8=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=p6GQOnOhJBSgGI/97oUzrtRkJfXiXamvSDBxwuttj491HRxNPYQbINlaKtlC1nV5mK+LMmXNYSjnPQywxHOFbjnM123VvD2FmHWq1WHS7lO6ZoPoJhKfbjOGdpgxEZtbWXJSQJKm09qf3o5dbSDq2T9rUwLtt2IP4qRndTp7gZ0= ARC-Authentication-Results: i=1; server2.sourceware.org X-CSE-ConnectionGUID: jAinPIckTQiMvMQOc4vZ5Q== X-CSE-MsgGUID: 5zx82NnxR8i/nU7HL9VEwQ== X-IronPort-AV: E=Sophos;i="6.03,254,1694764800"; d="scan'208";a="20901596" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa3.mentor.iphmx.com with ESMTP; 26 Oct 2023 08:49:30 -0800 IronPort-SDR: xSKRUwwhUrhYwof3H7cWdgrBxhjMlGKWkzSd1oNmb/HAjO8O3XSSJ2iee22WOSlaTR7FHxk69j cQUp/iY95CiTHYIa66tKe9j2Efh6+FicfryxlLgvy+5qHGvAnmA1q46pYVQY94XX3IcW6Kc5LR poeYIVC4VbpHJKpAxsNPkVjI/+Wjv14juoyH6lEgpbWvHnpK7iT+GoSxnAFkGRecWqlk+GT57u Mpjdc+CJXvAXQmCWeNUEA5fnefLzrX7YKGwtVQCEiSS7HKZgrdWELTCao/bLfH9P/k2aWcWbE4 V00= From: Thomas Schwinge To: Paul-Antoine Arras CC: , , Tobias Burnus Subject: Re: [PATCH] Fortran: Fix incompatible types between INTEGER(8) and TYPE(c_ptr) In-Reply-To: <2b01b415-e8db-4ea5-a2ca-cba66ed7d851@codesourcery.com> References: <6fc6a877-2dc7-4551-b141-fd117c66ecfa@codesourcery.com> <78236b34-a5bd-4ccf-a197-94bee00b8a2b@codesourcery.com> <4cec8ab5-9300-4628-a945-24db1249edf4@codesourcery.com> <87il6t1hr3.fsf@euler.schwinge.homeip.net> <2b01b415-e8db-4ea5-a2ca-cba66ed7d851@codesourcery.com> User-Agent: Notmuch/0.29.1+93~g67ed7df (https://notmuchmail.org) Emacs/27.1 (x86_64-pc-linux-gnu) Date: Thu, 26 Oct 2023 18:49:20 +0200 Message-ID: <87bkcle3cf.fsf@dem-tschwing-1.ger.mentorg.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-15.mgc.mentorg.com (139.181.222.15) 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 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: Hi PA! On 2023-10-26T18:28:07+0200, Paul-Antoine Arras wrote= : > On 26/10/2023 18:16, you wrote: >> On 2023-10-26T13:24:04+0200, Paul-Antoine Arras wr= ote: >>> --- /dev/null >>> +++ b/gcc/testsuite/gfortran.dg/c_ptr_tests_20.f90 >>> @@ -0,0 +1,57 @@ >>> +! { dg-do compile } >>> +! { dg-additional-options "-fopenmp" } >>> +[...] >> >>> --- /dev/null >>> +++ b/gcc/testsuite/gfortran.dg/c_ptr_tests_21.f90 >>> @@ -0,0 +1,57 @@ >>> +! { dg-do compile } >>> +! { dg-additional-options "-fopenmp" } >>> +[...] >> >> OpenMP is not universally supported across different GCC configurations, >> so this will FAIL for some. Therefore, please either guard with >> effective target: >> >> @item fopenmp >> Target supports OpenMP via @option{-fopenmp}. >> > > Would the following be enough? > >> diff --git gcc/testsuite/gfortran.dg/c_ptr_tests_20.f90 gcc/testsuite/gf= ortran.dg/c_ptr_tests_20.f90 >> index 7dd510400f3..131603d3819 100644 >> --- gcc/testsuite/gfortran.dg/c_ptr_tests_20.f90 >> +++ gcc/testsuite/gfortran.dg/c_ptr_tests_20.f90 >> @@ -1,4 +1,5 @@ >> ! { dg-do compile } >> +! { dg-require-effective-target fopenmp } >> ! { dg-additional-options "-fopenmp" } >> ! >> ! This failed to compile the declare variant directive due to the C_PTR >> diff --git gcc/testsuite/gfortran.dg/c_ptr_tests_21.f90 gcc/testsuite/gf= ortran.dg/c_ptr_tests_21.f90 >> index 05ccb771eee..060d29d0275 100644 >> --- gcc/testsuite/gfortran.dg/c_ptr_tests_21.f90 >> +++ gcc/testsuite/gfortran.dg/c_ptr_tests_21.f90 >> @@ -1,4 +1,5 @@ >> ! { dg-do compile } >> +! { dg-require-effective-target fopenmp } >> ! { dg-additional-options "-fopenmp" } >> ! >> ! Ensure that C_PTR and C_FUNPTR are reported as incompatible types in = variant Yes, that looks good to me -- you may push "as obvious". 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