File tree Expand file tree Collapse file tree 4 files changed +34
-2
lines changed
Expand file tree Collapse file tree 4 files changed +34
-2
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ source `dirname ${BASH_SOURCE[0]}`/../config.sh
44
55echo " ::group::Build Aarch64 tests"
66 cd tests
7- cmake -S . -B build
7+ if [ $RUN_CONFIG = 1 ] || [ ! -f build/CMakeCache.txt ] ; then
8+ cmake -S . -B build
9+ fi
810 cmake --build build
911echo " ::endgroup::"
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ if (NOT DEFINED ENV{TARGET})
44 set (ENV{TARGET } "aarch64-w64-mingw32" )
55endif ()
66if (NOT DEFINED ENV{TOOLCHAIN_PATH})
7- set (ENV{TOOLCHAIN_PATH} "$ENV{HOME} /cross" )
7+ set (ENV{TOOLCHAIN_PATH} "$ENV{HOME} /cross-aarch64-w64-mingw32-msvcrt " )
88endif ()
99
1010set (CMAKE_C_COMPILER "$ENV{TOOLCHAIN_PATH} /bin/$ENV{TARGET} -gcc" )
Original file line number Diff line number Diff line change 11#include <stdio.h>
2+ #include <complex.h>
23
34_Float128 foo (_Float128 x )
45{
@@ -33,4 +34,21 @@ void math_test()
3334 baz (1.2 Q );
3435
3536 printf ("ok\n" );
37+ }
38+
39+ void cexp_test ()
40+ {
41+ _Complex double z = 1.0 + 2.0 * I ;
42+ _Complex double w = __builtin_cexp (z );
43+
44+ printf ("%f + %f * I\n" , creal (w ), cimag (w ));
45+ }
46+
47+
48+ void ccos_test ()
49+ {
50+ _Complex double z = 1.0 + 2.0 * I ;
51+ _Complex double w = __builtin_ccos (z );
52+
53+ printf ("%f + %f * I\n" , creal (w ), cimag (w ));
3654}
Original file line number Diff line number Diff line change 11#include < gtest/gtest.h>
22
33extern " C" void math_test ();
4+ extern " C" void cexp_test ();
5+ extern " C" void ccos_test ();
46
57TEST (Aarch64MinGW, MathTest)
68{
79 math_test ();
810}
11+
12+ TEST (Aarch64MinGW, CexpTest)
13+ {
14+ cexp_test ();
15+ }
16+
17+ TEST (Aarch64MinGW, CcosTest)
18+ {
19+ ccos_test ();
20+ }
You can’t perform that action at this time.
0 commit comments