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
This commit is contained in:
Tobias Burnus 2012-03-12 10:03:49 +01:00 committed by Tobias Burnus
parent 914e2f45f4
commit 0859be1776
4 changed files with 34 additions and 0 deletions

View File

@ -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.

View File

@ -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++)
{

View File

@ -1,3 +1,8 @@
2012-03-12 Tobias Burnus <burnus@net-b.de>
PR fortran/52542
* gfortran.dg/proc_ptr_35.f90: New.
2012-03-11 Uros Bizjak <ubizjak@gmail.com>
PR target/52530

View File

@ -0,0 +1,16 @@
! { dg-do compile }
!
! PR fortran/52542
!
! Ensure that the procedure myproc is Bind(C).
!
! Contributed by Mat Cross of NAG
!
interface
subroutine s() bind(c)
end subroutine s
end interface
procedure(s) :: myproc
call myproc()
end
! { dg-final { scan-assembler-not "myproc_" } }