From e6f1b17149aa67d80c4ebc0b0f22c55e7694f07a Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sun, 9 Aug 2020 08:53:10 +0200 Subject: [PATCH] Gfortran 8 failed with At line 115 of file DAMASK/src/system_routines.f90 Fortran runtime error: Unequal character lengths (93/52) in MERGE intrinsic not sure whether this is a false alarm or not ... --- src/system_routines.f90 | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/system_routines.f90 b/src/system_routines.f90 index 913fe82c8..9a2442163 100644 --- a/src/system_routines.f90 +++ b/src/system_routines.f90 @@ -112,9 +112,11 @@ function getCWD() call getCurrentWorkDir_C(getCWD_Cstring,stat) - getCWD = merge(c_f_string(getCWD_Cstring), & - 'Error occured when getting currend working directory', & - stat == 0_C_INT) + if(stat == 0) then + getCWD = c_f_string(getCWD_Cstring) + else + getCWD = 'Error occured when getting currend working directory' + endif end function getCWD @@ -130,9 +132,11 @@ function getHostName() call getHostName_C(getHostName_Cstring,stat) - getHostName = merge(c_f_string(getHostName_Cstring), & - 'Error occured when getting host name', & - stat == 0_C_INT) + if(stat == 0) then + getHostName = c_f_string(getHostName_Cstring) + else + getHostName = 'Error occured when getting host name' + endif end function getHostName