FR 5485 then FR 9602 at Madrid
Porto → Madrid → Rome
Timetable, Madrid time
22:45FR 5485 from Porto at the gate
14:15FR 9602 to Rome leaves the gate
15 h 30 apart on the timetable, overnight
FR 9602 leaves 15 h 30 after FR 5485 arrives on the timetable: more than half a day, so not a connection we count.