From 36e8fcb430c211318b0e74b1f9a28e23c220813c Mon Sep 17 00:00:00 2001 From: NRavoisin96 Date: Mon, 7 Oct 2024 15:42:41 +0100 Subject: [PATCH] Compilation error fix gfortran >= 13.2 --- NuclearData/mgNeutronData/mgNeutronMaterial_inter.f90 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/NuclearData/mgNeutronData/mgNeutronMaterial_inter.f90 b/NuclearData/mgNeutronData/mgNeutronMaterial_inter.f90 index 4b8aa0cfa..888898857 100644 --- a/NuclearData/mgNeutronData/mgNeutronMaterial_inter.f90 +++ b/NuclearData/mgNeutronData/mgNeutronMaterial_inter.f90 @@ -111,11 +111,16 @@ subroutine getMacroXSs_byP(self, xss, p) class(mgNeutronMaterial), intent(in) :: self type(neutronMacroXSs), intent(out) :: xss class(particle), intent(in) :: p + integer(shortInt) :: matIdx character(100), parameter :: Here = 'getMacroXSs_byP (mgNeutronMateerial_inter.f90)' if (.not. p % isMG) call fatalError(Here, 'CE particle was given to MG data') - associate (matCache => cache_materialCache(p % matIdx())) + !! + !! Here it is necessary to store p % matIdx() in a dedicated variable to avoid compilation errors with gfortran >= 13.2 + !! + matIdx = p % matIdx() + associate (matCache => cache_materialCache(matIdx)) if (matCache % G_tail /= p % G) then ! Get cross sections