diff options
author | Janus Weil <janus@gcc.gnu.org> | 2010-11-11 22:44:15 +0100 |
---|---|---|
committer | Janus Weil <janus@gcc.gnu.org> | 2010-11-11 22:44:15 +0100 |
commit | 8be3d7da69db5781f0f6004c1fdadf1eab2f736d (patch) | |
tree | 6046ac875c6f0fca0365777b61d16f9e4817d752 /gcc | |
parent | d32ef397c98b50171cb13eb0421ace2479368eec (diff) | |
download | gcc-8be3d7da69db5781f0f6004c1fdadf1eab2f736d.zip gcc-8be3d7da69db5781f0f6004c1fdadf1eab2f736d.tar.gz gcc-8be3d7da69db5781f0f6004c1fdadf1eab2f736d.tar.bz2 |
resolve.c (resolve_procedure_interface): Copy 'is_bind_c' attribute.
2010-11-11 Janus Weil <janus@gcc.gnu.org>
* resolve.c (resolve_procedure_interface): Copy 'is_bind_c' attribute.
2010-11-11 Janus Weil <janus@gcc.gnu.org>
* gfortran.dg/proc_decl_24.f90: New.
From-SVN: r166623
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/fortran/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/fortran/resolve.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/proc_decl_24.f90 | 22 |
4 files changed, 31 insertions, 0 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 1478f9a..ebabcb7 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,7 @@ +2010-11-11 Janus Weil <janus@gcc.gnu.org> + + * resolve.c (resolve_procedure_interface): Copy 'is_bind_c' attribute. + 2010-11-10 Joseph Myers <joseph@codesourcery.com> * trans-array.c (gfc_trans_deferred_array): Use "front-end" diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index 2c9d6f6..1f5630d 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -176,6 +176,7 @@ resolve_procedure_interface (gfc_symbol *sym) sym->attr.recursive = ifc->attr.recursive; sym->attr.always_explicit = ifc->attr.always_explicit; sym->attr.ext_attr |= ifc->attr.ext_attr; + sym->attr.is_bind_c = ifc->attr.is_bind_c; /* Copy array spec. */ sym->as = gfc_copy_array_spec (ifc->as); if (sym->as) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 3156601..bac2400 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2010-11-11 Janus Weil <janus@gcc.gnu.org> + + * gfortran.dg/proc_decl_24.f90: New. + 2010-11-11 Nicola Pero <nicola.pero@meta-innovation.com> * objc.dg/property/at-property-20.m: New. diff --git a/gcc/testsuite/gfortran.dg/proc_decl_24.f90 b/gcc/testsuite/gfortran.dg/proc_decl_24.f90 new file mode 100644 index 0000000..01cbb7c --- /dev/null +++ b/gcc/testsuite/gfortran.dg/proc_decl_24.f90 @@ -0,0 +1,22 @@ +! { dg-do compile } +! +! Contributed by James van Buskirk +! +! http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/44d572766bce0e6f/ + + use iso_c_binding + implicit none + + abstract interface + subroutine all_subs(x,y) bind(C) + use iso_c_binding + real(c_float) :: x,y + end subroutine all_subs + end interface + + procedure(all_subs) :: sub + type(C_FUNPTR) :: s + + s = c_funloc (sub) + +end |