From 6c437f09abda3dae594480b07688d02ad325a956 Mon Sep 17 00:00:00 2001 From: rem1776 Date: Fri, 17 May 2024 16:35:52 -0400 Subject: [PATCH] fix for gcc 14 --- fms2_io/include/register_global_attribute.inc | 2 +- fms2_io/include/register_variable_attribute.inc | 2 +- m4/gx_compiler_bug_checks.m4 | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fms2_io/include/register_global_attribute.inc b/fms2_io/include/register_global_attribute.inc index e23c195380..e3e11a63c8 100644 --- a/fms2_io/include/register_global_attribute.inc +++ b/fms2_io/include/register_global_attribute.inc @@ -41,7 +41,7 @@ subroutine register_global_attribute_0d(fileobj, & err = nf90_put_att(fileobj%ncid, & nf90_global, & trim(attribute_name), & - trim(attribute_value(1:str_len))) + trim(attribute_value)) type is (integer(kind=i4_kind)) err = nf90_put_att(fileobj%ncid, & nf90_global, & diff --git a/fms2_io/include/register_variable_attribute.inc b/fms2_io/include/register_variable_attribute.inc index 87848a84ca..aaa70da108 100644 --- a/fms2_io/include/register_variable_attribute.inc +++ b/fms2_io/include/register_variable_attribute.inc @@ -53,7 +53,7 @@ subroutine register_variable_attribute_0d(fileobj, variable_name, attribute_name type is (character(len=*)) if (.not. present(str_len)) call error("Need to include str length:"//trim(append_error_msg)) err = nf90_put_att(fileobj%ncid, varid, trim(attribute_name), & - trim(attribute_value(1:str_len))) + trim(attribute_value)) type is (integer(kind=i4_kind)) err = nf90_put_att(fileobj%ncid, varid, trim(attribute_name), & attribute_value) diff --git a/m4/gx_compiler_bug_checks.m4 b/m4/gx_compiler_bug_checks.m4 index 7c046714db..af4b50f810 100644 --- a/m4/gx_compiler_bug_checks.m4 +++ b/m4/gx_compiler_bug_checks.m4 @@ -59,7 +59,7 @@ AC_COMPILE_IFELSE([[ subroutine test_sub(ctype) select type(ctype) type is (character(len=*)) - ctype(:) = "" + ctype = "" end select end subroutine test_sub]], [gx_cv_class_char_array_bug_check=no])