From 75a924aa2ea0f896ed7f8aebac7d72e07b918e81 Mon Sep 17 00:00:00 2001 From: Dan Bonachea Date: Mon, 13 Jan 2025 19:19:58 -0800 Subject: [PATCH] FIXUP: Implement prif_get_team Fortran does not guarantee short-circuit evaluation of boolean expressions, and this one was crashing with flang-new --- src/caffeine/teams_s.f90 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/caffeine/teams_s.f90 b/src/caffeine/teams_s.f90 index 094608a9..b9547eae 100644 --- a/src/caffeine/teams_s.f90 +++ b/src/caffeine/teams_s.f90 @@ -80,7 +80,9 @@ end procedure module procedure prif_get_team - if (.not. present(level) .or. level == PRIF_CURRENT_TEAM) then + if (.not. present(level)) then + team = current_team + else if (level == PRIF_CURRENT_TEAM) then team = current_team else if (level == PRIF_PARENT_TEAM) then team = prif_team_type(current_team%info%parent_team)