We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c3051e6 commit 4ad1697Copy full SHA for 4ad1697
1 file changed
test/bool/main.f90
@@ -1,4 +1,4 @@
1
-program boollog
+program logical_C_bool
2
3
use, intrinsic ::iso_c_binding, only : C_BOOL
4
@@ -13,10 +13,15 @@ logical(C_BOOL) function logical_not(a) bind(C)
13
14
logical(C_BOOL) :: t, f
15
16
+logical :: true_f, false_f
17
+
18
t = .true.
19
f = .false.
20
-if (logical_not(t)) error stop "logical_not(.true.) should be .false."
-if (.not. logical_not(f)) error stop "logical_not(.false.) should be .true."
21
+false_f = logical_not(t)
22
+true_f = logical_not(f)
23
24
+if (false_f) error stop "logical_not(.true.) should be .false."
25
+if (.not. true_f) error stop "logical_not(.false.) should be .true."
26
27
end program
0 commit comments