WASHINGTON - US President Donald Trump said he is hopeful about his forthcoming meeting with Kim Jong Un, top leader of the Democratic People's Republic of Korea (DPRK), while warning about the consequences if the meeting did not go well.

"I hope to have a very successful meeting," Trump said at a joint news conference with Japanese Prime Minister Shinzo Abe in Florida on Wednesday, referring to his planned meeting with Kim scheduled in May or early June. "We will be doing everything possible to make it a worldwide success."

Yet, Trump made clear that he'd still be ready to pull out of what he called a "tremendous" meeting between the leaders of two countries that have been longtime adversaries.

"If I think that it's a meeting that is not going to be fruitful, we're not going to go," said the US president.

"If the meeting, when I'm there, is not fruitful, I will respectfully leave the meeting, and we'll continue what we're doing or whatever it is that we'll continue," he added.

Washington and Pyongyang have started direct negotiations about the two leaders' meeting. Trump said that CIA chief Mike Pompeo has formed a "good relationship" with Kim in their secret meeting in Pyongyang last week.

Abe was on a two-day visit to the United States starting from Tuesday, the second of its kind since Trump assumed the presidency last year.

On Wednesday, Trump confirmed the clandestine meeting had happened, heaping praise on Pompeo - the man he has already tapped to be the next secretary of state - and saying his covert mission to the North Korean capital had been a success.

"He just left North Korea. Had a great meeting with Kim Jong Un, and got along with him really well, really great," Trump said. "He's very smart but he gets along with people."

Trump earlier tweeted that "details of Summit" between him and Kim were "being worked out now," with five possible locations being considered.

Ever disposed to set out the options in the starkest terms possible, Trump predicted a "very successful" May or June summit with Kim, after talks in Florida with Japanese Prime Minister Shinzo Abe.

But in the same breath, he warned: "If I think that it's a meeting that is not going to be fruitful, we're not going to go. If the meeting, when I'm there, is not fruitful, I will respectfully leave the meeting."

"I like always remaining flexible, and we'll remain flexible here," Trump added.

The United States and North Korea - foes since a bloody, muddy hot conflict of the 1950s and the ideological battles of the Cold War - have had peace within sight before.

But with similarly risk-taking mercurial leaders in both Washington and Pyongyang, there are hopes the two countries can go a step further than 2000, when Kim's father and Bill Clinton met each other's emissaries, but never each other.

Trump said Wednesday, with Abe at his side, that the North had "a bright path available" if it was willing to abandon nuclear weapons.

North Korea's military is an integral part of the ruling regime, and officials and outside experts say it is still not clear that Kim is willing to completely give up those weapons.

Pyongyang consistently talks of "denuclearization of the Korean peninsula" - code for the removal of America's military presence in the South, something long unthinkable in Washington - while Trump refers to the denuclearization of North Korea.

In Florida, Trump echoed the sentiments of his guest, Abe, saying that North Korea must denuclearize in a "complete and verifiable and irreversible" way.

The comments set the stage for a pair of potentially historic summits. Kim is expected to meet South Korea's President Moon Jae-in next week for landmark talks at which discussion of a formal peace declaration is now on the cards.

The 1950-53 Korean War ended in an armistice rather than a peace treaty, leaving the two sides technically at war. The Demilitarized Zone between them bristles with minefields and fortifications.

Seoul's push to formally declare an end to inter-Korean hostilities would have been unthinkable just months ago.

"We are looking at the possibility of replacing the armistice regime on the Korean peninsula with a peace regime," a senior official at South Korea's presidential Blue House said Wednesday.

"But this is not something we can do by ourselves. It needs close discussions with relevant parties including North Korea."

Trump said the summit could, with his "blessing," explore a peace treaty to formally end the conflict.

But reaching any final treaty would be fraught with complications.

While the US-led United Nations command, China and North Korea are signatories to the decades-old armistice, South Korea is not.

Both Pyongyang and Seoul claim sovereignty over the whole Korean peninsula, but a treaty could imply mutual recognition of each other.

Next week's meeting will be just the third summit between the North and South since the armistice was signed 65 years ago.

Key moments including Kim and Moon's first handshake will be televised live, both sides agreed at working-level talks Wednesday, Seoul said.

As for Trump's summit with Kim, US officials say that no decision has yet been made on a meeting venue, but Europe, China, North Korea, South Korea, and Panmunjom in the Demilitarized Zone are seen as possible locations.