Message ID | 20170622102850.GX2123@tucnak |
---|---|
State | New |
Headers | show |
> Another option would be to change atomic_access_required_p to add > *sync = false; > before the first return, or to initialize bool sync = false; at the > definition. Yes, let's do the initialization at the definition (no need to retest).
--- gcc/ada/gcc-interface/trans.c.jj 2017-06-21 16:53:37.000000000 +0200 +++ gcc/ada/gcc-interface/trans.c 2017-06-22 12:19:45.458928009 +0200 @@ -6985,6 +6985,7 @@ gnat_to_gnu (Node_Id gnat_node) { bool outer_atomic_access = outer_atomic_access_required_p (Name (gnat_node)); + sync = false; bool atomic_access = !outer_atomic_access && atomic_access_required_p (Name (gnat_node), &sync);