A 7.4-magnitude earthquake has struck off the coasts of Argentina and Chile, sparking tsunami warnings.