aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/raise-gcc.c
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2016-11-30 14:59:16 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2016-11-30 14:59:16 +0100
commit60aa52287572b287e94f52fc8b22c9e01d56458e (patch)
tree08acb54b69a8451bbb846619ee2d79750f196e71 /gcc/ada/raise-gcc.c
parentba85c8c3fcb19c776f6e2209d5b0044c9e1cdd3d (diff)
downloadgcc-60aa52287572b287e94f52fc8b22c9e01d56458e.zip
gcc-60aa52287572b287e94f52fc8b22c9e01d56458e.tar.gz
gcc-60aa52287572b287e94f52fc8b22c9e01d56458e.tar.bz2
[multiple changes]
2016-11-30 Gary Dismukes <dismukes@adacore.com> * sem_prag.adb, sem_ch6.adb: Minor reformatting and typo fixes. * g-sechas.adb: Minor reformatting. * lib-xref.ads: minor grammar fix in comment. * lib-xref-spark_specific.adb (Is_SPARK_Reference): do not ignore references to concurrent objects. * sinfo.ads: Fix of unbalanced parens in comment 2016-11-30 Ed Schonberg <schonberg@adacore.com> * lib-xref.adb (Get_Type_Reference): If the entity is a function returning a classwide type, the type reference is obtained right away and does not need further unwinding. 2016-11-30 Javier Miranda <miranda@adacore.com> * sem_ch8.adb (Find_Renamed_Entity): For non-overloaded subprogram actuals of generic units check that the spec of the renaming and renamed entities match. 2016-11-30 Tristan Gingold <gingold@adacore.com> * raise-gcc.c: For CERT runtimes: do not use gcc includes, simplify the handling. * sem_attr.adb (Analyze_Attribute): Check No_Dynamic_Priorities restriction for Priority Attribute. From-SVN: r243022
Diffstat (limited to 'gcc/ada/raise-gcc.c')
-rw-r--r--gcc/ada/raise-gcc.c29
1 files changed, 27 insertions, 2 deletions
diff --git a/gcc/ada/raise-gcc.c b/gcc/ada/raise-gcc.c
index 4a10fbf..a2b6f64 100644
--- a/gcc/ada/raise-gcc.c
+++ b/gcc/ada/raise-gcc.c
@@ -6,7 +6,7 @@
* *
* C Implementation File *
* *
- * Copyright (C) 1992-2014, Free Software Foundation, Inc. *
+ * Copyright (C) 1992-2016, Free Software Foundation, Inc. *
* *
* GNAT is free software; you can redistribute it and/or modify it under *
* terms of the GNU General Public License as published by the Free Soft- *
@@ -36,8 +36,13 @@
#error "RTS unit only"
#endif
+#ifndef CERT
#include "tconfig.h"
#include "tsystem.h"
+#else
+#define ATTRIBUTE_UNUSED __attribute__((unused))
+#define HAVE_GETIPINFO 1
+#endif
#include <stdarg.h>
typedef char bool;
@@ -80,6 +85,15 @@ extern struct Exception_Occurrence *__gnat_setup_current_excep
(_Unwind_Exception *);
extern void __gnat_unhandled_except_handler (_Unwind_Exception *);
+#ifdef CERT
+#define abort() __gnat_raise_abort()
+static void __gnat_raise_abort(void)
+{
+ while (1)
+ ;
+}
+#endif
+
#include "unwind-pe.h"
/* The known and handled exception classes. */
@@ -928,9 +942,13 @@ is_handled_by (_Unwind_Ptr choice, _GNAT_Exception *propagated_exception)
/* All others and others choice match any foreign exception. */
if (choice == GNAT_ALL_OTHERS
|| choice == GNAT_OTHERS
- || choice == (_Unwind_Ptr) &Foreign_Exception)
+#ifndef CERT
+ || choice == (_Unwind_Ptr) &Foreign_Exception
+#endif
+ )
return handler;
+#ifndef CERT
/* C++ exception occurrences. */
if (exception_class_eq (propagated_exception, CXX_EXCEPTION_CLASS)
&& Language_For (choice) == 'C')
@@ -947,6 +965,7 @@ is_handled_by (_Unwind_Ptr choice, _GNAT_Exception *propagated_exception)
if (choice_typeinfo == except_typeinfo)
return handler;
}
+#endif
return nothing;
}
@@ -1172,6 +1191,7 @@ personality_body (_Unwind_Action uw_phases,
}
else
{
+#ifndef CERT
struct Exception_Occurrence *excep;
/* Trigger the appropriate notification routines before the second
@@ -1182,6 +1202,7 @@ personality_body (_Unwind_Action uw_phases,
__gnat_notify_unhandled_exception (excep);
else
__gnat_notify_handled_exception (excep);
+#endif
return _URC_HANDLER_FOUND;
}
@@ -1195,10 +1216,12 @@ personality_body (_Unwind_Action uw_phases,
setup_to_install
(uw_context, uw_exception, action.landing_pad, action.ttype_filter);
+#ifndef CERT
/* Write current exception, so that it can be retrieved from Ada. It was
already done during phase 1 (just above), but in between, one or several
exceptions may have been raised (in cleanup handlers). */
__gnat_setup_current_excep (uw_exception);
+#endif
return _URC_INSTALL_CONTEXT;
}
@@ -1338,6 +1361,7 @@ PERSONALITY_FUNCTION (_Unwind_State state,
/* Callback routine called by Unwind_ForcedUnwind to execute all the cleanup
before exiting the task. */
+#ifndef CERT
_Unwind_Reason_Code
__gnat_cleanupunwind_handler (int version ATTRIBUTE_UNUSED,
_Unwind_Action phases,
@@ -1362,6 +1386,7 @@ __gnat_cleanupunwind_handler (int version ATTRIBUTE_UNUSED,
and this hook will gain control again. */
return _URC_NO_REASON;
}
+#endif
/* Define the consistently named wrappers imported by Propagate_Exception. */