This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/52542] Procedure with a Bind (C) named interface does not inherit the Bind (C)
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 09 Mar 2012 13:31:19 +0000
- Subject: [Bug fortran/52542] Procedure with a Bind (C) named interface does not inherit the Bind (C)
- Auto-submitted: auto-generated
- References: <bug-52542-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52542
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |wrong-code
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-03-09
CC| |burnus at gcc dot gnu.org
Ever Confirmed|0 |1
--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-03-09 13:31:19 UTC ---
Confirmed. It's an interesting issue, but fortunately clearly specified in the
standard (F2008):
C1222 (R1211) If proc-language-binding-spec is specified, the proc-interface
shall appear, it shall be an interface-name, and interface-name shall be
declared with a proc-language-binding-spec.
and then in 12.4.3.6p5 (normative):
"A proc-language-binding-spec without a NAME= is allowed, but is redundant with
the proc-interface required by C1222."
Untested patch:
--- a/gcc/fortran/decl.c
+++ b/gcc/fortran/decl.c
@@ -4857,2 +4857,5 @@ match_procedure_decl (void)
+ if (proc_if && proc_if->attr.is_bind_c)
+ sym->attr.is_bind_c = 1;
+
/* Get procedure symbols. */