From f5bf3a0af008e0737877ac8a64730dee9d839dc2 Mon Sep 17 00:00:00 2001
From: Philippe WAUTELET <philippe.wautelet@aero.obs-mip.fr>
Date: Wed, 19 Jun 2024 13:18:10 +0200
Subject: [PATCH] Philippe 19/06/2024: modd_io: workaround problem for NVHPC
 and Cray compilers

---
 src/LIB/SURCOUCHE/src/modd_io.f90 | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/LIB/SURCOUCHE/src/modd_io.f90 b/src/LIB/SURCOUCHE/src/modd_io.f90
index f4548dc12..9b5a1995c 100644
--- a/src/LIB/SURCOUCHE/src/modd_io.f90
+++ b/src/LIB/SURCOUCHE/src/modd_io.f90
@@ -167,6 +167,12 @@ TYPE(TFILEDATA), POINTER :: TFILE_SURFEX  => NULL() !Pointer used to find the fi
 TYPE(TFILEDATA), POINTER :: TFILE_OUTPUTLISTING  => NULL() !Pointer used to point to the file used when writing to OUTPUT_LISTINGn file
 
 !Non existing file which can be used as a dummy target
+#if !defined(MNH_COMPILER_CCE) && !defined(MNH_COMPILER_NVHPC)
+!Compiler crash with Cray CCE 12.0.3, OK with CCE 11.0.2
+!Compiler crash with Nvidia NVHPC 23.11 and after (OK with older versions)
 TYPE(TFILEDATA), TARGET :: TFILE_DUMMY = TFILEDATA( CNAME="dummy", CDIRNAME=NULL(), TFILES_IOZ=NULL() )
+#else
+TYPE(TFILEDATA), TARGET :: TFILE_DUMMY
+#endif
 
 END MODULE MODD_IO
-- 
GitLab