aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/decl.c
diff options
context:
space:
mode:
authorTobias Burnus <burnus@net-b.de>2012-03-12 10:03:49 +0100
committerTobias Burnus <burnus@gcc.gnu.org>2012-03-12 10:03:49 +0100
commit0859be177649f940d85209820906b0399626d839 (patch)
treea095e5db07e0352c9ed73b95087d80a8fb2a70be /gcc/fortran/decl.c
parent914e2f45f4220321d5ced3ef39f5f3e6d8c2223a (diff)
downloadgcc-0859be177649f940d85209820906b0399626d839.zip
gcc-0859be177649f940d85209820906b0399626d839.tar.gz
gcc-0859be177649f940d85209820906b0399626d839.tar.bz2
re PR fortran/52542 (Procedure with a Bind (C) named interface does not inherit the Bind (C))
2012-03-12 Tobias Burnus <burnus@net-b.de> PR fortran/52542 * decl.c (match_procedure_decl): If the interface is bind(C), the procedure is as well. 2012-03-12 Tobias Burnus <burnus@net-b.de> PR fortran/52542 * gfortran.dg/proc_ptr_35.f90: New. From-SVN: r185215
Diffstat (limited to 'gcc/fortran/decl.c')
-rw-r--r--gcc/fortran/decl.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c
index 75b8a89..4da21c3 100644
--- a/gcc/fortran/decl.c
+++ b/gcc/fortran/decl.c
@@ -4855,6 +4855,13 @@ match_procedure_decl (void)
if (m == MATCH_ERROR)
return MATCH_ERROR;
+ if (proc_if && proc_if->attr.is_bind_c && !current_attr.is_bind_c)
+ {
+ current_attr.is_bind_c = 1;
+ has_name_equals = 0;
+ curr_binding_label = NULL;
+ }
+
/* Get procedure symbols. */
for(num=1;;num++)
{