From c994e8b06ae255488d1dfc327cc48ebfda85761c Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Tue, 19 Dec 2017 08:43:49 +0000 Subject: [PATCH] re PR ada/66205 (gnatbind generates invalid code when finalization is enabled in restricted runtime) PR ada/66205 * bindgen.adb (Gen_AdaFinal): Revert previous change. From-SVN: r255811 --- gcc/ada/ChangeLog | 5 +++++ gcc/ada/bindgen.adb | 12 ------------ 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index e414acdb885..068255b33b7 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2017-12-19 Arnaud Charlet + + PR ada/66205 + * bindgen.adb (Gen_AdaFinal): Revert previous change. + 2017-12-15 Jakub Jelinek * gcc-interface/utils.c (gnat_internal_attribute_table): Swap diff --git a/gcc/ada/bindgen.adb b/gcc/ada/bindgen.adb index 44d521e8c46..e3d875bc8cc 100644 --- a/gcc/ada/bindgen.adb +++ b/gcc/ada/bindgen.adb @@ -450,18 +450,6 @@ package body Bindgen is begin WBI (" procedure " & Ada_Final_Name.all & " is"); - -- If task termination is not allowed, as is the case in restricted - -- runtimes, such as Ravenscar or ZFP, but may not be the case for all - -- configurable runtimes, we do not need program-level finalization. - - if Cumulative_Restrictions.Set (No_Task_Termination) then - WBI (" begin"); - WBI (" null;"); - WBI (" end " & Ada_Final_Name.all & ";"); - WBI (""); - return; - end if; - -- Call s_stalib_adafinal to await termination of tasks and so on. We -- want to do this if there is a main program, either in Ada or in some -- other language. (Note that Bind_Main_Program is True for Ada mains, -- 2.30.2