FR 2540 then VY 1011 at Madrid
Bucharest → Madrid → Barcelona
Timetable, Madrid time
13:55FR 2540 from Bucharest at the gate
09:20VY 1011 to Barcelona leaves the gate
19 h 25 apart on the timetable, overnight
VY 1011 leaves 19 h 25 after FR 2540 arrives on the timetable: more than half a day, so not a connection we count.