EW 2522 then IB 422 at Barcelona
Stuttgart → Barcelona → Madrid
Timetable, Barcelona time
20:00EW 2522 from Stuttgart at the gate
19:55IB 422 to Madrid leaves the gatealso IB 422S, LA 1588, CX 1820, LL 3022, VY 5096, AV 6149, QR 8069
23 h 55 apart on the timetable, overnight
IB 422 leaves 23 h 55 after EW 2522 arrives on the timetable: more than half a day, so not a connection we count.