public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Paul-Antoine Arras <pa@codesourcery.com>
To: Thomas Schwinge <thomas@codesourcery.com>,
	Tobias Burnus <tobias@codesourcery.com>
Cc: <fortran@gcc.gnu.org>, gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Fortran: Fix incompatible types between INTEGER(8) and TYPE(c_ptr)
Date: Thu, 26 Oct 2023 18:28:07 +0200	[thread overview]
Message-ID: <2b01b415-e8db-4ea5-a2ca-cba66ed7d851@codesourcery.com> (raw)
In-Reply-To: <87il6t1hr3.fsf@euler.schwinge.homeip.net>

Hi Thomas,

On 26/10/2023 18:16, you wrote:
> Hi!
> 
> On 2023-10-26T13:24:04+0200, Paul-Antoine Arras <pa@codesourcery.com> wrote:
>> --- /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/gfortran.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/gfortran.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 

Thanks,
-- 
PA


  reply	other threads:[~2023-10-26 16:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-20 14:02 Paul-Antoine Arras
2023-10-24 16:12 ` Tobias Burnus
2023-10-26 11:24   ` Paul-Antoine Arras
2023-10-26 12:33     ` Tobias Burnus
2023-10-26 16:16     ` Thomas Schwinge
2023-10-26 16:28       ` Paul-Antoine Arras [this message]
2023-10-26 16:49         ` Thomas Schwinge
2023-10-26 17:00         ` tobias.burnus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2b01b415-e8db-4ea5-a2ca-cba66ed7d851@codesourcery.com \
    --to=pa@codesourcery.com \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=thomas@codesourcery.com \
    --cc=tobias@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).