FR 5316 then FR 7921 at Madrid
Rome → Madrid → Shannon
Timetable, Madrid time
16:05FR 5316 from Rome at the gate
13:25FR 7921 to Shannon leaves the gate
21 h 20 apart on the timetable, overnight
FR 7921 leaves 21 h 20 after FR 5316 arrives on the timetable: more than half a day, so not a connection we count.