Skip to content

Commit 4a7c43d

Browse files
committed
bool: nvfortran workaround
1 parent db6058a commit 4a7c43d

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/bool/logbool.f90

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,14 @@ logical(c_bool) function logical_not(L) bind(C)
1919
ic = 0
2020
Ld = .false.
2121

22-
logical_not = .not. L
22+
!> workaround for nvfortran 24.3 etc.
23+
! logical_not = .not. L
24+
if(L) then
25+
logical_not = .false._C_BOOL
26+
else
27+
logical_not = .true._C_BOOL
28+
endif
29+
2330

2431
print '(/, a, l1, a, l1)', "logical_not(", L, "): ", logical_not
2532

0 commit comments

Comments
 (0)