From: Harald Anlauf <anlauf@gmx.de>
To: Thomas Koenig <tkoenig@netcologne.de>,
fortran <fortran@gcc.gnu.org>,
gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Fortran: procedures with BIND(C) attribute require explicit interface [PR85877]
Date: Sun, 19 Mar 2023 20:38:02 +0100 [thread overview]
Message-ID: <abe0cc89-22aa-ce16-09fd-9c20efe2c207@gmx.de> (raw)
In-Reply-To: <56697d6e-7fe1-cb94-125e-7f9828be5d15@netcologne.de>
Hi Thomas,
Am 19.03.23 um 08:34 schrieb Thomas Koenig via Gcc-patches:
> Hi Harald,
>
>> Am 18.03.23 um 19:52 schrieb Thomas Koenig via Gcc-patches:
>>> Hi Harald,
>>>
>>>> the Fortran standard requires an explicit procedure interface in
>>>> certain
>>>> situations, such as when they have a BIND(C) attribute
>>>> (F2018:15.4.2.2).
>>>> The attached patch adds a check for this.
>>>>
>>>> Regtested on x86_64-pc-linux-gnu. OK for mainline?
>>>
>>> While this fixes the ICE, it misses
>>>
>>> function f() bind(c)
>>> f = 42.
>>> end
>>>
>>> subroutine p
>>> bind(c) f ! { dg-error "must be explicit" }
>>> x = f()
>>> end
>>
>> what do you mean by "it misses"?
>
> Sorry, that was caused by confusion on my part (and it is better
> to test an assumption of what the compiler actually does :-)
>
> Patch is OK, also for backport. Maybe you can also include the
> test above, just to make sure.
I've added your suggestion to the testcase. Pushed as:
https://gcc.gnu.org/g:5426ab34643d9e6502f3ee572891a03471fa33ed
> Best regards
>
> Thomas
>
>
Thanks,
Harald
prev parent reply other threads:[~2023-03-19 19:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-17 21:36 Harald Anlauf
2023-03-18 18:52 ` Thomas Koenig
2023-03-18 20:59 ` Harald Anlauf
2023-03-19 7:34 ` Thomas Koenig
2023-03-19 19:38 ` Harald Anlauf [this message]
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=abe0cc89-22aa-ce16-09fd-9c20efe2c207@gmx.de \
--to=anlauf@gmx.de \
--cc=fortran@gcc.gnu.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=tkoenig@netcologne.de \
/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).