aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/exp_util.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/exp_util.adb')
-rw-r--r--gcc/ada/exp_util.adb10
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb
index d41a6bc..e4b4389 100644
--- a/gcc/ada/exp_util.adb
+++ b/gcc/ada/exp_util.adb
@@ -1581,7 +1581,10 @@ package body Exp_Util is
or else Etype (First_Entity (Op)) = Etype (Last_Entity (Op)));
Next_Elmt (Prim);
- pragma Assert (Present (Prim));
+
+ if No (Prim) then
+ raise Program_Error;
+ end if;
end loop;
return Node (Prim);
@@ -1608,7 +1611,10 @@ package body Exp_Util is
Prim := First_Elmt (Primitive_Operations (Typ));
while not Is_TSS (Node (Prim), Name) loop
Next_Elmt (Prim);
- pragma Assert (Present (Prim));
+
+ if No (Prim) then
+ raise Program_Error;
+ end if;
end loop;
return Node (Prim);