From 1d5018955a37fa665acc8dcba8121dd365dbe9be Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Sat, 4 Jun 2022 10:44:13 +0000 Subject: [Ada] Remove exception propagation during bootstrap To help the bootstrap path, we want to keep the compiler free from any exception propagation during bootstrap. This has been broken recently in various places. Also introduce a way to more easily detect such breakage via the -DNO_EXCEPTION_PROPAGATION which can now be used as part of BOOT_CFLAGS. gcc/ada/ * exp_imgv.adb (Build_Enumeration_Image_Tables): Also disable perfect hash in GNAT_Mode. * raise-gcc.c (__gnat_Unwind_RaiseException): Add support for disabling exception propagation. * sem_eval.adb (Compile_Time_Known_Value): Update comment and remove wrong call to Check_Error_Detected. * sem_prag.adb (Check_Loop_Pragma_Grouping, Analyze_Pragma): Remove exception propagation during bootstrap. --- gcc/ada/raise-gcc.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gcc/ada/raise-gcc.c') diff --git a/gcc/ada/raise-gcc.c b/gcc/ada/raise-gcc.c index f4c42c0..b03964c 100644 --- a/gcc/ada/raise-gcc.c +++ b/gcc/ada/raise-gcc.c @@ -1377,6 +1377,10 @@ __gnat_cleanupunwind_handler (int version ATTRIBUTE_UNUSED, _Unwind_Reason_Code __gnat_Unwind_RaiseException (_Unwind_Exception *e) { +#ifdef NO_EXCEPTION_PROPAGATION + abort(); +#endif + #ifdef __USING_SJLJ_EXCEPTIONS__ return _Unwind_SjLj_RaiseException (e); #else -- cgit v1.1