From c4fa2450034e09239fa73a5db76724c18e37c887 Mon Sep 17 00:00:00 2001 From: dougiesquire Date: Wed, 25 Feb 2026 08:58:13 +1100 Subject: [PATCH] Initialize Ocean_state pointer to null() in access drivers This ensures the pointer has a defined association status on declaration, avoiding undefined behavior when using GCC. --- src/access/accesscm_coupler/ocean_solo.F90 | 2 +- src/access/accessom_coupler/ocean_solo.F90 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/access/accesscm_coupler/ocean_solo.F90 b/src/access/accesscm_coupler/ocean_solo.F90 index 0fd42996a..de828f0c6 100644 --- a/src/access/accesscm_coupler/ocean_solo.F90 +++ b/src/access/accesscm_coupler/ocean_solo.F90 @@ -161,7 +161,7 @@ program main implicit none type (ocean_public_type) :: Ocean_sfc - type (ocean_state_type), pointer :: Ocean_state + type (ocean_state_type), pointer :: Ocean_state => null() type(ice_ocean_boundary_type), target :: Ice_ocean_boundary type(coupler_2d_bc_type), target :: Atm_fields diff --git a/src/access/accessom_coupler/ocean_solo.F90 b/src/access/accessom_coupler/ocean_solo.F90 index 5baf2de77..294718227 100644 --- a/src/access/accessom_coupler/ocean_solo.F90 +++ b/src/access/accessom_coupler/ocean_solo.F90 @@ -118,7 +118,7 @@ program main implicit none type (ocean_public_type) :: Ocean_sfc - type (ocean_state_type), pointer :: Ocean_state + type (ocean_state_type), pointer :: Ocean_state => null() type(ice_ocean_boundary_type), target :: Ice_ocean_boundary type(coupler_2d_bc_type), target :: Atm_fields type(accessom2_type) :: accessom2