OSDN Git Service

2009-11-19 Tobias Burnus <burnus@net-b.de>
authorburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 19 Nov 2009 08:57:02 +0000 (08:57 +0000)
committerburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 19 Nov 2009 08:57:02 +0000 (08:57 +0000)
       * gfortran.texi (Interoperable Subroutines and Functions): Fix
       example.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154326 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/fortran/ChangeLog
gcc/fortran/gfortran.texi

index e1f72a1..fc0a033 100644 (file)
@@ -1,3 +1,8 @@
+2009-11-19  Tobias Burnus  <burnus@net-b.de>
+
+       * gfortran.texi (Interoperable Subroutines and Functions): Fix
+       example.
+
 2009-11-18  Janus Weil  <janus@gcc.gnu.org>
 
        PR fortran/42072
 2009-11-18  Janus Weil  <janus@gcc.gnu.org>
 
        PR fortran/42072
index c4992ef..1430c8a 100644 (file)
@@ -2009,9 +2009,10 @@ Thus the following C prototype
 matches the Fortran declaration
 
 @smallexample
 matches the Fortran declaration
 
 @smallexample
-  integer(c_int) func(i,j)
-    integer, VALUE :: i
-    integer :: j
+  integer(c_int) function func(i,j)
+    use iso_c_binding, only: c_int
+    integer(c_int), VALUE :: i
+    integer(c_int) :: j
 @end smallexample
 
 Note that pointer arguments also frequently need the @code{VALUE} attribute.
 @end smallexample
 
 Note that pointer arguments also frequently need the @code{VALUE} attribute.