If validity checks are enabled in Ravenscar mode, avoid incorrect error messages complaining that simple barriers are not simple.
Tested on x86_64-pc-linux-gnu, committed on trunk 2017-09-18 Bob Duff <d...@adacore.com> * exp_ch9.adb (Is_Simple_Barrier_Name): Follow Original_Node, in case validity checks have rewritten the tree.
Index: exp_ch9.adb =================================================================== --- exp_ch9.adb (revision 252907) +++ exp_ch9.adb (working copy) @@ -6000,11 +6000,13 @@ begin -- Check if the name is a component of the protected object. If - -- the expander is active, the component has been transformed into - -- a renaming of _object.all.component. + -- the expander is active, the component has been transformed into a + -- renaming of _object.all.component. Original_Node is needed in case + -- validity checking is enabled, in which case the simple object + -- reference will have been rewritten. if Expander_Active then - Renamed := Renamed_Object (Entity (N)); + Renamed := Renamed_Object (Entity (Original_Node (N))); return Present (Renamed)