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

Reply via email to