FR 5898 then UX 7703 at Madrid
Torino → Madrid → Barcelona
Timetable, Madrid time
17:35FR 5898 from Torino at the gate
15:15UX 7703 to Barcelona leaves the gate
21 h 40 apart on the timetable, overnight
UX 7703 leaves 21 h 40 after FR 5898 arrives on the timetable: more than half a day, so not a connection we count.