FR 5316 then IB 1243 at Madrid
Rome → Madrid → Bologna
Timetable, Madrid time
23:40FR 5316 from Rome at the gate
21:20IB 1243 to Bologna leaves the gatealso LA 1730, VY 5554, QR 8085
21 h 40 apart on the timetable, overnight
IB 1243 leaves 21 h 40 after FR 5316 arrives on the timetable: more than half a day, so not a connection we count.