> I've come up with a considerably simpler patch, which merely causes the > procedure adafinal to be generated with a null body if the restriction > No_Task_Termination is set (note, this restriction is part of the > Ravenscar profile; if tasks can't terminate, program level finalization > can't happen [ARM 10.2(25), "When the environment task completes > (normally or abnormally), it waits for the termination of all such tasks, > and then finalizes any remaining objects of the partition."] > > I've bootstrapped the compiler (x86_64-apple-darwin15), and "make > check-ada" produces the same results with and without the patch (the same 3 > FAILs occur in both, in gnat.sum). For the arm-eabi compiler, I > successfully make and run builds for an STM32F4 target without exception > propagation but with and without finalization.
That's a much simpler and better approach indeed. OK to commit. > gcc/ada/Changelog: > > 2017-12-05 Simon Wright <si...@pushface.org> > > PR ada/66205 > * bindgen.adb (Gen_AdaFinal): If the restriction > No_Task_Termination is present, generate a null body. >