public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Thomas Koenig <tkoenig@netcologne.de>
To: Harald Anlauf <anlauf@gmx.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 08:34:34 +0100	[thread overview]
Message-ID: <56697d6e-7fe1-cb94-125e-7f9828be5d15@netcologne.de> (raw)
In-Reply-To: <ce489a6c-9c95-d5de-0e8a-5a7d90c62600@gmx.de>

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.

Best regards

	Thomas


  parent reply	other threads:[~2023-03-19  7:34 UTC|newest]

Thread overview: 7+ 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-18 20:59     ` Harald Anlauf
2023-03-19  7:34     ` Thomas Koenig [this message]
2023-03-19 19:38       ` Harald Anlauf
2023-03-19 19:38         ` Harald Anlauf

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=56697d6e-7fe1-cb94-125e-7f9828be5d15@netcologne.de \
    --to=tkoenig@netcologne.de \
    --cc=anlauf@gmx.de \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    /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).