FR 6792 then FR 5484 at Madrid
Marrakesh → Madrid → Porto
Timetable, Madrid time
22:05FR 6792 from Marrakesh at the gate
21:40FR 5484 to Porto leaves the gate
23 h 35 apart on the timetable, overnight
FR 5484 leaves 23 h 35 after FR 6792 arrives on the timetable: more than half a day, so not a connection we count.