On Mon, 16 Jul 2018, Marcel Keller wrote:
I've found that the attached program, which supposedly adds 1 and 0 as 128-bit numbers using inline assembly, outputs 2^64 + 1 instead when compiled with g++ 7 or 8 and at least -O1. Am I doing something wrong, or is this a compiler bug?
I think the keyword is early-clobber. Try "+&r" for the first variable, which is overwritten in the first instruction, so gcc knows not to merge it with x[1].
-- Marc Glisse