The test also failed using gcc, libgcc1, g++ versions 7.4.0 and 9.3.0 on Windows.
The test succeeded on various Linux installations using gcc, libgcc1, g++ version 9.3.0.
The test succeeded when using mingw-w64 with gcc, libgcc1, g++ version 8.1.0.
A colleague successfuly ran the test by building and installing version 8.1.0 into his Cygwin environment, making us believe that this failure is dependent on compiler version.
$ make all
------------------------------ Compile rtest_ac_div.cpp ----------------------------------
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-cygwin/10/lto-wrapper.exe
Target: x86_64-pc-cygwin
Configured with: /mnt/share/cygpkgs/gcc/gcc.x86_64/src/gcc-10.2.0/configure --srcdir=/mnt/share/cygpkgs/gcc/gcc.x86_64/src/gcc-10.2.0 --prefix=/usr --exec-prefix=/usr --localstatedir=/var --sysconfdir=/etc --docdir=/usr/share/doc/gcc --htmldir=/usr/share/doc/gcc/html -C --build=x86_64-pc-cygwin --host=x86_64-pc-cygwin --target=x86_64-pc-cygwin --without-libiconv-prefix --without-libintl-prefix --libexecdir=/usr/lib --with-gcc-major-version-only --enable-shared --enable-shared-libgcc --enable-static --enable-version-specific-runtime-libs --enable-bootstrap --enable-__cxa_atexit --with-dwarf2 --with-tune=generic --enable-languages=c,c++,fortran,lto,objc,obj-c++ --enable-graphite --enable-threads=posix --enable-libatomic --enable-libgomp --enable-libquadmath --enable-libquadmath-support --disable-libssp --enable-libada --disable-symvers --with-gnu-ld --with-gnu-as --with-cloog-include=/usr/include/cloog-isl --without-libiconv-prefix --without-libintl-prefix --with-system-zlib --enable-linker-build-id --with-default-libstdcxx-abi=gcc4-compatible --enable-libstdcxx-filesystem-ts
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 10.2.0 (GCC)
COLLECT_GCC_OPTIONS='-U' '__STRICT_ANSI__' '-g' '-std=c++11' '-v' '-I' '../../ac_types-master/include' '-I' '../include' '-s' '-o' 'rtest_ac_div.o' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
/usr/lib/gcc/x86_64-pc-cygwin/10/cc1plus.exe -quiet -v -I ../../ac_types-master/include -I ../include -idirafter /usr/lib/gcc/x86_64-pc-cygwin/10/../../../../lib/../include/w32api -idirafter /usr/lib/gcc/x86_64-pc-cygwin/10/../../../../x86_64-pc-cygwin/lib/../lib/../../include/w32api -U __STRICT_ANSI__ rtest_ac_div.cpp -quiet -dumpbase rtest_ac_div.cpp -mtune=generic -march=x86-64 -auxbase rtest_ac_div -g -std=c++11 -version -o /tmp/cckMLdGU.s
GNU C++11 (GCC) version 10.2.0 (x86_64-pc-cygwin)
compiled by GNU C version 10.2.0, GMP version 6.2.0, MPFR version 4.1.0, MPC version 1.1.0, isl version isl-0.22.1-GMP
warning: GMP header version 6.2.0 differs from library version 6.2.1.
warning: MPC header version 1.1.0 differs from library version 1.2.1.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory "/usr/lib/gcc/x86_64-pc-cygwin/10/include-fixed"
ignoring nonexistent directory "/usr/lib/gcc/x86_64-pc-cygwin/10/../../../../x86_64-pc-cygwin/include"
ignoring duplicate directory "/usr/lib/gcc/x86_64-pc-cygwin/10/../../../../x86_64-pc-cygwin/lib/../lib/../../include/w32api"
#include "..." search starts here:
#include <...> search starts here:
../../ac_types-master/include
../include
/usr/lib/gcc/x86_64-pc-cygwin/10/include/c++
/usr/lib/gcc/x86_64-pc-cygwin/10/include/c++/x86_64-pc-cygwin
/usr/lib/gcc/x86_64-pc-cygwin/10/include/c++/backward
/usr/lib/gcc/x86_64-pc-cygwin/10/include
/usr/include
/usr/lib/gcc/x86_64-pc-cygwin/10/../../../../lib/../include/w32api
End of search list.
GNU C++11 (GCC) version 10.2.0 (x86_64-pc-cygwin)
compiled by GNU C version 10.2.0, GMP version 6.2.0, MPFR version 4.1.0, MPC version 1.1.0, isl version isl-0.22.1-GMP
warning: GMP header version 6.2.0 differs from library version 6.2.1.
warning: MPC header version 1.1.0 differs from library version 1.2.1.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 91598a8452df03f30a560d5af0d56f5c
COLLECT_GCC_OPTIONS='-U' '__STRICT_ANSI__' '-g' '-std=c++11' '-v' '-I' '../../ac_types-master/include' '-I' '../include' '-s' '-o' 'rtest_ac_div.o' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
/usr/lib/gcc/x86_64-pc-cygwin/10/../../../../x86_64-pc-cygwin/bin/as.exe -v -I ../../ac_types-master/include -I ../include -o /tmp/cc5mGND6.o /tmp/cckMLdGU.s
GNU assembler version 2.36.1 (x86_64-pc-cygwin) using BFD version (GNU Binutils) 2.36.1
COMPILER_PATH=/usr/lib/gcc/x86_64-pc-cygwin/10/:/usr/lib/gcc/x86_64-pc-cygwin/10/:/usr/lib/gcc/x86_64-pc-cygwin/:/usr/lib/gcc/x86_64-pc-cygwin/10/:/usr/lib/gcc/x86_64-pc-cygwin/:/usr/lib/gcc/x86_64-pc-cygwin/10/../../../../x86_64-pc-cygwin/bin/
LIBRARY_PATH=/usr/lib/gcc/x86_64-pc-cygwin/10/:/usr/lib/gcc/x86_64-pc-cygwin/10/../../../../x86_64-pc-cygwin/lib/../lib/:/usr/lib/gcc/x86_64-pc-cygwin/10/../../../../lib/:/lib/../lib/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-pc-cygwin/10/../../../../x86_64-pc-cygwin/lib/:/usr/lib/gcc/x86_64-pc-cygwin/10/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-U' '__STRICT_ANSI__' '-g' '-std=c++11' '-v' '-I' '../../ac_types-master/include' '-I' '../include' '-s' '-o' 'rtest_ac_div.o' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
/usr/lib/gcc/x86_64-pc-cygwin/10/collect2.exe -plugin /usr/lib/gcc/x86_64-pc-cygwin/10/cyglto_plugin.dll -plugin-opt=/usr/lib/gcc/x86_64-pc-cygwin/10/lto-wrapper.exe -plugin-opt=-fresolution=/tmp/ccaxG3SL.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lcygwin -plugin-opt=-pass-through=-ladvapi32 -plugin-opt=-pass-through=-lshell32 -plugin-opt=-pass-through=-luser32 -plugin-opt=-pass-through=-lkernel32 -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --build-id -m i386pep --wrap _Znwm --wrap _Znam --wrap _ZdlPv --wrap _ZdaPv --wrap _ZnwmRKSt9nothrow_t --wrap _ZnamRKSt9nothrow_t --wrap _ZdlPvRKSt9nothrow_t --wrap _ZdaPvRKSt9nothrow_t -Bdynamic --dll-search-prefix=cyg --tsaware -o rtest_ac_div.o -s /usr/lib/gcc/x86_64-pc-cygwin/10/../../../../lib/crt0.o /usr/lib/gcc/x86_64-pc-cygwin/10/crtbegin.o -L/usr/lib/gcc/x86_64-pc-cygwin/10 -L/usr/lib/gcc/x86_64-pc-cygwin/10/../../../../x86_64-pc-cygwin/lib/../lib -L/usr/lib/gcc/x86_64-pc-cygwin/10/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-pc-cygwin/10/../../../../x86_64-pc-cygwin/lib -L/usr/lib/gcc/x86_64-pc-cygwin/10/../../.. /tmp/cc5mGND6.o -Bstatic -lstdc++ -Bdynamic -lgcc_s -lgcc -lcygwin -ladvapi32 -lshell32 -luser32 -lkernel32 -lgcc_s -lgcc /usr/lib/gcc/x86_64-pc-cygwin/10/../../../../lib/default-manifest.o /usr/lib/gcc/x86_64-pc-cygwin/10/crtend.o
COLLECT_GCC_OPTIONS='-U' '__STRICT_ANSI__' '-g' '-std=c++11' '-v' '-I' '../../ac_types-master/include' '-I' '../include' '-s' '-o' 'rtest_ac_div.o' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
------------------------------ Running rtest_ac_div.cpp ----------------------------------
=============================================================================
Testing function: ac_div(), Scalar and complex values. - Allowed error 0.5 (fixed pt)
TEST: ac_div() INPUTS: ac_int<16,false> ac_int<16,false> ac_int<17,true> ac_int<17,true> OUTPUTS: ac_int<16,false> ac_int<17,true> RESULT: PASSED
TEST: ac_div() INPUTS: ac_fixed<16,8,false,AC_TRN,AC_WRAP> ac_fixed<16,8,false,AC_TRN,AC_WRAP> ac_fixed<17,9,true,AC_TRN,AC_WRAP> ac_fixed<17,9,true,AC_TRN,AC_WRAP> OUTPUTS: ac_fixed<64,32,false,AC_TRN,AC_WRAP> ac_fixed<65,33,true,AC_TRN,AC_WRAP> RESULT: PASSED , max err (0.000000) (0.000000 complex)
TEST: ac_div() INPUTS: ac_fixed<16,-8,false,AC_TRN,AC_WRAP> ac_fixed<16,-8,false,AC_TRN,AC_WRAP> ac_fixed<17,-7,true,AC_TRN,AC_WRAP> ac_fixed<17,-7,true,AC_TRN,AC_WRAP> OUTPUTS: ac_fixed<64,32,false,AC_TRN,AC_WRAP> ac_fixed<65,33,true,AC_TRN,AC_WRAP> RESULT: PASSED , max err (0.000000) (0.000000 complex)
TEST: ac_div() INPUTS: ac_fixed<8,16,false,AC_TRN,AC_WRAP> ac_fixed<8,16,false,AC_TRN,AC_WRAP> ac_fixed<9,17,true,AC_TRN,AC_WRAP> ac_fixed<9,17,true,AC_TRN,AC_WRAP> OUTPUTS: ac_fixed<64,32,false,AC_TRN,AC_WRAP> ac_fixed<65,33,true,AC_TRN,AC_WRAP> RESULT: PASSED , max err (0.000000) (0.000000 complex)
TEST: ac_div() INPUTS: ac_float<10,5,4,true,AC_TRN> ac_float<10,5,4,true,AC_TRN> OUTPUT: ac_float<64,32,10,true,AC_TRN> RESULT: FAILED , max err (200.000000)
TEST: ac_div() INPUTS: ac_float<10,4,4,true,AC_TRN> ac_float<8,5,5,true,AC_TRN> OUTPUT: ac_float<64,32,10,true,AC_TRN> RESULT: PASSED , max err (0.000010)
TEST: ac_div() INPUTS: ac_float<10,-4,4,true,AC_TRN> ac_float<8,-5,5,true,AC_TRN> OUTPUT: ac_float<64,32,10,true,AC_TRN> RESULT: PASSED , max err (0.000002)
TEST: ac_div() INPUTS: ac_float<4,10,4,true,AC_TRN> ac_float<5,8,5,true,AC_TRN> OUTPUT: ac_float<64,32,10,true,AC_TRN> RESULT: PASSED , max err (0.000000)
=============================================================================
Testbench finished. Maximum error observed across all bit-width variations:
max_error_fixed = 0
max_error_cmplx_fixed = 1.45487e-09
max_error_float = 200
ac_div - FAILED - Error tolerance(s) exceeded
=============================================================================
make: *** [Makefile:84: rtest_ac_div.o] Error 1
Summary of failed tests:
Test environment:
The test also failed using gcc, libgcc1, g++ versions 7.4.0 and 9.3.0 on Windows.
The test succeeded on various Linux installations using gcc, libgcc1, g++ version 9.3.0.
The test succeeded when using mingw-w64 with gcc, libgcc1, g++ version 8.1.0.
A colleague successfuly ran the test by building and installing version 8.1.0 into his Cygwin environment, making us believe that this failure is dependent on compiler version.
Verbose output of failed ac_div() test: