From 46e214d03a76143e34b7116b0e64d3cf616a3672 Mon Sep 17 00:00:00 2001 From: Philippe WAUTELET <philippe.wautelet@aero.obs-mip.fr> Date: Mon, 4 Jul 2022 11:01:25 +0200 Subject: [PATCH] Philippe 04/07/2022: workaroung GCC bug: date_time is not defined as an extended type of date (to prevent failure when reading arrays of date_type in namelists) --- src/MNH/modd_type_date.f90 | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/MNH/modd_type_date.f90 b/src/MNH/modd_type_date.f90 index e9717d321..d1b3078e8 100644 --- a/src/MNH/modd_type_date.f90 +++ b/src/MNH/modd_type_date.f90 @@ -1,4 +1,4 @@ -!MNH_LIC Copyright 1997-2020 CNRS, Meteo-France and Universite Paul Sabatier +!MNH_LIC Copyright 1997-2022 CNRS, Meteo-France and Universite Paul Sabatier !MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence !MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt !MNH_LIC for details. version 1. @@ -47,8 +47,19 @@ type date integer :: nday = 0 end type date ! +#if 0 +!GCC BUG: if an extended type is used in an array for a namelist, the reading fails +!GCC bug (at least from 5.5 to 12.1, see GCC bug 106065) type, extends( date ) :: date_time real :: xtime = XNEGUNDEF end type date_time +#else +type :: date_time + integer :: nyear = NNEGUNDEF + integer :: nmonth = 0 + integer :: nday = 0 + real :: xtime = XNEGUNDEF +end type date_time +#endif ! end module modd_type_date -- GitLab