US President Donald Trump used the Group of Seven (G7) summit in France to promote a preliminary agreement with Iran.