From 680c9e11d4403fb8db151d320284ad5bbe989065 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Wed, 29 Aug 2018 08:26:28 +0200 Subject: [PATCH] segmentation fault in cause of empty list --- src/config.f90 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/config.f90 b/src/config.f90 index 837818756..d028eb897 100644 --- a/src/config.f90 +++ b/src/config.f90 @@ -351,7 +351,7 @@ end subroutine finalize !-------------------------------------------------------------------------------------------------- !> @brief cleans entire array of linke lists -!> @details called when variable goes out of scope. +!> @details called when variable goes out of scope and deallocates the list at each array entry !-------------------------------------------------------------------------------------------------- subroutine finalizeArray(this) @@ -361,11 +361,11 @@ subroutine finalizeArray(this) type(tPartitionedStringList), pointer :: temp ! bug in Gfortran? do i=1, size(this) - !if (associated(this(i)%next)) then + if (associated(this(i)%next)) then temp => this(i)%next !deallocate(this(i)) !internal compiler error: in gfc_build_final_call, at fortran/trans.c:975 deallocate(temp) - !endif + endif enddo end subroutine finalizeArray