The repro process is a bit involved, but it seems like there is a possible problem somewhere in the ecmult_multi logic (or in gcc itself).
Repro:
Edit ./configure.ac to remove CFLAGS="$CFLAGS -O3"
Then:
$ CFLAGS='-g -O0' ../configure --with-asm=no
$ make tests && ./tests 0
[compiling...]
test count = 0
random seed = 6a777122d5fd053929192734d4913476
../src/field_5x52_impl.h:421: test condition failed: b->magnitude <= 8
Aborted
It's unclear why this problem doesn't show up when the optimization are turned on. The compiler used is gcc 7.3.0 .