loop
exit when TP_Cur = TP_Mapping_List.No_Element;
if TP_Mapping_List.Element (TP_Cur).TP_Name.all = TPtarg then
exit;
end if;
TP_Mapping_List.Next (TP_Cur);
end loop;
TP := TP_Mapping_List.Element (TP_Cur);
If TP_Cur = TP_Mapping_List.No_Element, then TP_Mapping_List.Element (TP_Cur) raises a constraint error.
I experienced a crash in gnattest's
Test.Skeleton.Add_DT
:If
TP_Cur = TP_Mapping_List.No_Element
, thenTP_Mapping_List.Element (TP_Cur)
raises a constraint error.