FR 3977 then IB 418 at Barcelona
Dublin → Barcelona → Madrid
Timetable, Barcelona time
22:55FR 3977 from Dublin at the gate
18:00IB 418 to Madrid leaves the gatealso IB 418S, LA 1585, CX 1836, LL 3018, VY 5082, AV 6019, QR 6562
19 h 05 apart on the timetable, overnight
IB 418 leaves 19 h 05 after FR 3977 arrives on the timetable: more than half a day, so not a connection we count.