**C, 40 bytes**

    gcd(x,y){while(x^=y^=x^=y%=x);return y;}