AW: 68000 issue in longlong.h

selco at selco at
Fri Mar 5 09:59:49 UTC 2021

If you could show the generated code (after gcc's register allocation)
*and* point out precisely where things go wrong, that would be helpful.


The generated code is on the compiler explorer link I provided: 

There you see the original code on the left and the generated assembly in the middle.
You can add the & to
"=d" (__umul_tmp1)
in the left window and you see immediately the change in the comiled output.

I am not the expert here and I do not want to complain or bother you at all. It was just my observation of symptoms I wanted to report.
The compiler maintainer says "gcc is ok, the problem is in longlong.h"
You say "longlong.h looks ok, we wouldn't hide compiler bugs."

For me the workaround (add &) works and all tests pass with it, so can live with the workaround. But somewhere there must be a bug/glitch. If you could prove gcc to be wrong that would also be a really great result!

Thanks for all your effort

Best regards Alexander

More information about the gmp-bugs mailing list