From dae5882f9ce598ed5c3adb89e21989f41b547bbd Mon Sep 17 00:00:00 2001
From: Tobias Burnus <burnus@net-b.de>
Date: Thu, 19 Nov 2009 09:57:02 +0100
Subject: [PATCH] gfortran.texi (Interoperable Subroutines and Functions): Fix
 example.

2009-11-19  Tobias Burnus  <burnus@net-b.de>

       * gfortran.texi (Interoperable Subroutines and Functions): Fix
       example.

From-SVN: r154326
---
 gcc/fortran/ChangeLog     | 5 +++++
 gcc/fortran/gfortran.texi | 7 ++++---
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index e1f72a12f98d..fc0a03356841 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -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
diff --git a/gcc/fortran/gfortran.texi b/gcc/fortran/gfortran.texi
index c4992ef2bced..1430c8a658e5 100644
--- a/gcc/fortran/gfortran.texi
+++ b/gcc/fortran/gfortran.texi
@@ -2009,9 +2009,10 @@ Thus the following C prototype
 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.
-- 
GitLab