File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
Examples/test-suite/fortran Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -8,17 +8,27 @@ program ccomplextest_runme
8
8
implicit none
9
9
complex (C_FLOAT_COMPLEX) :: cflt
10
10
complex (C_DOUBLE_COMPLEX) :: cdbl
11
+ logical :: do_test = .false.
12
+
13
+ ! Older compilers just wrap the calls, but the C code fails
14
+ if (has_c99_complex() == 1 ) do_test = .true.
11
15
12
16
cflt = (1 , 3 ) ! 1 + 3i
13
17
cflt = Conjf(cflt)
14
- ASSERT(cflt == (1 , - 3 ))
18
+ if (do_test) then
19
+ ASSERT(cflt == (1 , - 3 ))
20
+ endif
15
21
16
22
cdbl = (4.0000000001d0 , 1d0 )
17
- ASSERT(Conj(cdbl) == (4.0000000001d0 , - 1d0 ))
23
+ if (do_test) then
24
+ ASSERT(Conj(cdbl) == (4.0000000001d0 , - 1d0 ))
25
+ endif
18
26
19
27
cdbl = (4 , 5 )
20
28
cdbl = Conj2(cdbl)
21
- ASSERT(cdbl == (4d0 , - 5d0 ))
29
+ if (do_test) then
30
+ ASSERT(cdbl == (4d0 , - 5d0 ))
31
+ endif
22
32
23
33
end program
24
34
You can’t perform that action at this time.
0 commit comments