A British exit from the European Union would be a serious risk to global economic growth, Group of Seven leaders have said in a summit declaration, although German Chancellor Angela Merkel said the issue had not been discussed.

The statement will be welcomed by the British government, which has made a series of warnings about the domestic cost of leaving the bloc in a 23 June referendum on EU membership.

"A UK exit from the EU would reverse the trend towards greater global trade and investment, and the jobs they create, and is a further serious risk to growth," G7 leaders said, in the only reference to the vote in a 32-page declaration.

Brexit was listed alongside geopolitical conflicts, terrorism and refugee flows as a potential shock of a "non-economic origin".

The issue was not formally on the agenda at the two-day summit in Japan, but British government officials had said they expected it would come up on the margins.

Ms Merkel said that leaders had not discussed Brexit but that there was a consensus that they wanted the country to stay in.

"It was no subject here. But there was the signal that all who sat here want Britain to stay part of the EU," Ms Merkel told reporters on the sidelines of the summit.

However, she added that "the decision is up to the British voters."

French President Francois Hollande echoed Ms Merkel's comments, saying a Brexit would be bad news for the global economy.

"Economically, it would be bad news, bad news for the United Kingdom, as well as the world, not just Europe," Mr Hollande told a news conference.

"That would trigger capital transfers as well as the relocation of some activities that would not be for the benefit of the United Kingdom or even for Europe," he said.

However, Mr Hollande said it was not for France to say what Britain should do.

Opinion polls have given conflicting steers on which way the vote might go, with telephone polls suggesting "In" is comfortably ahead while online polls suggest a tight race that "Out" could win.

Betting odds heavily favour an "In" vote.

The G7 statement follows comments from the International Monetary Fund that there were no economic positives to Britain leaving the EU, while the Bank of England has said the economy would slow sharply, and possibly even enter a brief recession.

The Organisation for Economic Co-operation and Development has also warned that British voters risk paying a "Brexit tax" equivalent to a month's salary by 2020 if they leave the EU.

Last week, G7 finance leaders united in wishing Britain stayed in the EU, but acknowledged they could do little more than hope. 

Meanwhile, on the sidelines of the summit, Barack Obama, the first incumbent US president to visit Hiroshima, has laid a wreath at the site of the world's first atomic bombing.