https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90292
--- Comment #2 from Giuliano Belinassi <giuliano.belinassi at usp dot br> --- Just for the sake of completeness, this issue is not addressed by just changing the iterators to 'int'. However, it is in fact solved by changing the iterators to 'unsigned long', 'long', or doing a cast in each macro. GCC even generates faster code if one of these two last changes are made. Also, the statement in matrix_dgemm_2 should be *c += a * (*b); for correctness.