diff options
author | Tobias Burnus <burnus@net-b.de> | 2012-03-12 10:03:49 +0100 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2012-03-12 10:03:49 +0100 |
commit | 0859be177649f940d85209820906b0399626d839 (patch) | |
tree | a095e5db07e0352c9ed73b95087d80a8fb2a70be /gcc/fortran | |
parent | 914e2f45f4220321d5ced3ef39f5f3e6d8c2223a (diff) | |
download | gcc-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')
-rw-r--r-- | gcc/fortran/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/fortran/decl.c | 7 |
2 files changed, 13 insertions, 0 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 2da6551..7a0ec87 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +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-10 Steven Bosscher <steven@gcc.gnu.org> * convert.c (convert): Fold BOOLEAN_TYPE types to the proper variant. 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++) { |