FR 7156 then FR 5897 at Madrid
Dublin → Madrid → Torino
Timetable, Madrid time
20:40FR 7156 from Dublin at the gate
18:20FR 5897 to Torino leaves the gate
21 h 40 apart on the timetable, overnight
FR 5897 leaves 21 h 40 after FR 7156 arrives on the timetable: more than half a day, so not a connection we count.