From 96c9095dd6be3c9a7675b24169b966e70ae2a593 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Tue, 9 Jul 2024 08:06:48 -0600 Subject: [PATCH] gnu reports an error if this unused variable is not allocated --- mediator/med_phases_aofluxes_mod.F90 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mediator/med_phases_aofluxes_mod.F90 b/mediator/med_phases_aofluxes_mod.F90 index 406160cb..7697b574 100644 --- a/mediator/med_phases_aofluxes_mod.F90 +++ b/mediator/med_phases_aofluxes_mod.F90 @@ -1604,6 +1604,10 @@ subroutine set_aoflux_in_pointers(fldbun_a, fldbun_o, aoflux_in, lsize, xgrid, r if (add_gusts) then call fldbun_getfldptr(fldbun_a, 'Faxa_rainc', aoflux_in%rainc, xgrid=xgrid, rc=rc) if (chkerr(rc,__LINE__,u_FILE_u)) return + else + ! rainc is not used without add_gusts but some compilers complain about the unallocated pointer + ! in the subroutine interface + allocate(aoflux_in%rainc(1)) end if end if