Reigning champions Brazil were held to a goalless draw by the Ivory Coast in the men's Olympic football competition on Sunday, while Andre-Pierre Gignac's hat-trick in a 4-3 win over South Africa kept France's hopes alive.
Brazil, who won gold for the first time five years ago on home soil in Rio, could have moved to the brink of qualification for the knock-out stage in Yokohama but were denied by a stubborn Ivory Coast.
Eboue Kouassi's late dismissal evened up the numbers, but the Ivorians held on as former Barcelona winger Malcom missed a late chance for the South Americans.
Brazil lead Group D on goal difference ahead of their final game of the opening phase against Saudi Arabia, who face Germany later Sunday.
France would have been staring at an early exit with a slip-up against South Africa, but veteran striker Gignac rescued Les Bleus in a pulsating match in Saitama.
South Africa will need to beat Mexico in their last group game and hope other results go their way to have any chance of making the last eight.
Elsewhere, New Zealand missed an opportunity to all but qualify from Group B as Honduras came from behind to win 3-2 in Kashima.