summaryrefslogtreecommitdiff
path: root/gcc/ada/atree.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/atree.adb')
-rw-r--r--gcc/ada/atree.adb14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/ada/atree.adb b/gcc/ada/atree.adb
index dce76e9db41..70dd3801e5c 100644
--- a/gcc/ada/atree.adb
+++ b/gcc/ada/atree.adb
@@ -560,6 +560,20 @@ package body Atree is
(Nodes.Table (E + 2).Field12'Unrestricted_Access)).Convention := Val;
end Basic_Set_Convention;
+ --------------------------
+ -- Check_Error_Detected --
+ --------------------------
+
+ procedure Check_Error_Detected is
+ begin
+ -- An anomaly has been detected which is assumed to be a consequence of
+ -- a previous error. Raise an exception if no error found previously.
+
+ if Total_Errors_Detected = 0 then
+ raise Program_Error;
+ end if;
+ end Check_Error_Detected;
+
-----------------
-- Change_Node --
-----------------