From 28f90b7bdda0ce17e356d388d41b5baad757b91a Mon Sep 17 00:00:00 2001
From: Sergey Kosukhin <sergey.kosukhin@mpimet.mpg.de>
Date: Thu, 19 Dec 2019 12:36:15 +0100
Subject: [PATCH] Fix interface declaration for C function free() in the F2003
 interface.

---
 interfaces/f2003/bindGen.rb | 2 +-
 src/mo_cdi.f90              | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/interfaces/f2003/bindGen.rb b/interfaces/f2003/bindGen.rb
index deecd4ea4..695fd75c7 100755
--- a/interfaces/f2003/bindGen.rb
+++ b/interfaces/f2003/bindGen.rb
@@ -585,7 +585,7 @@ $verbatimDeclarations = '
 
 		subroutine lib_free(pointer) bind(c, name = "free")
 			import c_ptr
-			type(c_ptr), value :: pointer
+			type(c_ptr), value, intent(in) :: pointer
 		end subroutine lib_free
 	end interface
 '
diff --git a/src/mo_cdi.f90 b/src/mo_cdi.f90
index 35c58188a..ce8e72cb7 100644
--- a/src/mo_cdi.f90
+++ b/src/mo_cdi.f90
@@ -1,6 +1,6 @@
 ! >>> Warning: This is a generated file. If you modify it, you get what you deserve. <<<
 !
-! Generated by "../../../interfaces/f2003/bindGen.rb" from input file "../../../src/cdi.h".
+! Generated by "../interfaces/f2003/bindGen.rb" from input file "../src/cdi.h".
 
 module mo_cdi
   use iso_c_binding
@@ -18,7 +18,7 @@ module mo_cdi
 
     subroutine lib_free(pointer) bind(c, name = "free")
       import c_ptr
-      type(c_ptr), value :: pointer
+      type(c_ptr), value, intent(in) :: pointer
     end subroutine lib_free
   end interface
 
-- 
GitLab