I don't think GCC is doing something special, rather that -O3 might be optimizing out the subtraction. Try with -O0, I suspect you will get the same result as clang.
The "special" thing of note is that GCC considers it acceptable to change the semantics of this program depending on the optimization level.
The GCC compiler changes the order of the operations such that the assignment happens after the print for x.
call __printf_chk@PLT mov ecx, DWORD PTR 0[rbp] mov rdx, rbp mov edi, 2 mov DWORD PTR -96[rbx], 7