[Ada] New procedure Register_Global_Unhandled_Action
authorArnaud Charlet <charlet@adacore.com>
Wed, 22 Jan 2020 11:43:54 +0000 (06:43 -0500)
committerPierre-Marie de Rodat <derodat@adacore.com>
Thu, 4 Jun 2020 09:11:01 +0000 (05:11 -0400)
commit528576de0bd3bf7154952d9b5e7ced2b4ed7f038
tree278e069614f29e947c238035a70b4da010954e1e
parent32cc67203388abd9559b8acc6997b3c26dcc7080
[Ada] New procedure Register_Global_Unhandled_Action

2020-06-04  Arnaud Charlet  <charlet@adacore.com>

gcc/ada/

* libgnat/a-exextr.adb (Global_Unhandled_Action): New global
variable.
(Notify_Exception): Take into account Global_Unhandled_Action
and fix latent race condition.
(Exception_Action): Mark Favor_Top_Level so that variables can
be atomic.
(Global_Action): Mark atomic to remove the need for a lock.
* libgnat/g-excact.ads, libgnat/g-excact.adb
(Register_Global_Unhandled_Action): New procedure.
(Register_Global_Action): Remove lock.
* libgnat/s-stalib.ads (Raise_Action): Mark Favor_Top_Level to
be compatible with Exception_Action.
* sem_warn.adb (Warn_On_Unreferenced_Entity): Fix logic wrt
Volatile entities and entities with an address clause: the code
did not match the comment/intent.
gcc/ada/libgnat/a-exextr.adb
gcc/ada/libgnat/g-excact.adb
gcc/ada/libgnat/g-excact.ads
gcc/ada/libgnat/s-stalib.ads
gcc/ada/sem_warn.adb