In the case of a duly noted fall, puncture or mechanical incident in the last three kilometers of a road race stage, the rider or riders involved shall be credited with the time of the rider or riders in whose company they were riding at the moment of the accident. His or their placing shall be determined by the order in which he or they actually cross the finishing line. If, as the result of a duly noted fall in the last three kilometers, a rider cannot cross the finishing line, he shall be placed last in the stage and credited with the time of the rider or riders in whose company he was riding at the time of the accident.
But 2.6.029
Articles 2.6.027 and 2.6.028 shall not apply where the finish is at the top of a hill-climb, except if the incident occurs before the climb. Every discussion regarding the qualifications «at the top of a hill-climb» and «before the climb» will be decided by the commissaires panel.
http://www.uci.ch/mm/Document/News/Rulesandregulation/17/73/59/2-ROA-20160603-E_English.PDF
2.6.027
But 2.6.029