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. */