It is most definitely neccessary that GCC produce the same code regardless of which compiler it is built with, assuming that the compiler it is built with is not itself buggy.
Of course, but that's not what we're talking about. A cross compiler and a native compiler targeting the same CPU chip, that's a different story. But is the one we're talking about ...