From ffb16fcb86461c9aa03e01b1093e431208bbf5d8 Mon Sep 17 00:00:00 2001
From: Stephan Schulz <stephan.schulz-x2q@rub.de>
Date: Mon, 30 Nov 2020 12:51:05 +0100
Subject: [PATCH] make sure ALL_Staggered_f is Fortran 2003 compatible

---
 example/ALL_Staggered_f.F90 | 45 +++++++++++++++++--------------------
 1 file changed, 21 insertions(+), 24 deletions(-)

diff --git a/example/ALL_Staggered_f.F90 b/example/ALL_Staggered_f.F90
index 8f2c8a5..57e4b06 100644
--- a/example/ALL_Staggered_f.F90
+++ b/example/ALL_Staggered_f.F90
@@ -33,14 +33,14 @@ program ALL_Staggered_f
     use, intrinsic :: iso_fortran_env, only: stdin=>input_unit&
         , stdout=>output_unit&
         , stderr=>error_unit&
-        , file_storage_size&
-        ,int32,int64,real32,real64
+        , file_storage_size
 #ifndef ALL_USE_F08
     use mpi
 #else
     use mpi_f08
 #endif
     implicit none
+    integer, parameter :: real64 = selected_real_kind(15)
 
     call main()
 contains
@@ -132,6 +132,9 @@ contains
         integer :: my_rank, maximum_rank
         integer :: i,j
         type(ALL_t) :: jall
+#ifdef ALL_VTK_OUTPUT
+        character (len=ALL_ERROR_LENGTH) :: error_msg
+#endif
 
         call MPI_Init(error)
 
@@ -200,17 +203,14 @@ contains
                 flush(stdout)
             endif
 #ifdef ALL_VTK_OUTPUT
-            block
-                character (len=ALL_ERROR_LENGTH) :: error_msg
-                call ALL_reset_error()
-                call jall%print_vtk_outlines(current_step)
-                if(ALL_error() /= 0) then
-                    error_msg = ALL_error_description()
-                    write(stdout, '(a)') error_msg
-                    ! Maybe also abort if the output is necesssary or handle this
-                    ! some other way.
-                endif
-            end block
+            call ALL_reset_error()
+            call jall%print_vtk_outlines(current_step)
+            if(ALL_error() /= 0) then
+                error_msg = ALL_error_description()
+                write(stdout, '(a)') error_msg
+                ! Maybe also abort if the output is necesssary or handle this
+                ! some other way.
+            endif
 #endif
             call jall%balance()
 
@@ -221,17 +221,14 @@ contains
             call MPI_Barrier(MPI_COMM_WORLD, error)
         enddo
 #ifdef ALL_VTK_OUTPUT
-        block
-            character (len=ALL_ERROR_LENGTH) :: error_msg
-            call ALL_reset_error()
-            call jall%print_vtk_outlines(current_step)
-            if(ALL_error() /= 0) then
-                error_msg = ALL_error_description()
-                write(stdout, '(a)') error_msg
-                ! Maybe also abort if the output is necesssary or handle this
-                ! some other way.
-            endif
-        end block
+        call ALL_reset_error()
+        call jall%print_vtk_outlines(current_step)
+        if(ALL_error() /= 0) then
+            error_msg = ALL_error_description()
+            write(stdout, '(a)') error_msg
+            ! Maybe also abort if the output is necesssary or handle this
+            ! some other way.
+        endif
 #endif
 
         call jall%finalize()
-- 
GitLab