diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2018-01-10 23:36:02 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2018-01-10 23:36:02 +0000 |
commit | af95bb266a88d570db1b8bf5d57be430683bf1e9 (patch) | |
tree | e261143854165df2a889239587392c9a2348b4c9 /gcc/ada/gcc-interface/decl.c | |
parent | bdd82c9b9975a8bca850b99cd5cee75e6ed3c127 (diff) | |
download | gcc-af95bb266a88d570db1b8bf5d57be430683bf1e9.zip gcc-af95bb266a88d570db1b8bf5d57be430683bf1e9.tar.gz gcc-af95bb266a88d570db1b8bf5d57be430683bf1e9.tar.bz2 |
decl.c (gnat_to_gnu_component_type): Apply the check for atomic access once the component size is taken into account...
* gcc-interface/decl.c (gnat_to_gnu_component_type): Apply the check
for atomic access once the component size is taken into account and
also do it if the component type is Atomic or Volatile_Full_Access.
From-SVN: r256465
Diffstat (limited to 'gcc/ada/gcc-interface/decl.c')
-rw-r--r-- | gcc/ada/gcc-interface/decl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c index ab5fb0e..e8c48c7 100644 --- a/gcc/ada/gcc-interface/decl.c +++ b/gcc/ada/gcc-interface/decl.c @@ -5022,9 +5022,6 @@ gnat_to_gnu_component_type (Entity_Id gnat_array, bool definition, && tree_fits_uhwi_p (TYPE_SIZE (gnu_type))) gnu_type = make_packable_type (gnu_type, false, max_align); - if (Has_Atomic_Components (gnat_array)) - check_ok_for_atomic_type (gnu_type, gnat_array, true); - /* Get and validate any specified Component_Size. */ gnu_comp_size = validate_size (Component_Size (gnat_array), gnu_type, gnat_array, @@ -5071,6 +5068,9 @@ gnat_to_gnu_component_type (Entity_Id gnat_array, bool definition, gnat_array); } + if (Has_Atomic_Components (gnat_array) || Is_Atomic_Or_VFA (gnat_type)) + check_ok_for_atomic_type (gnu_type, gnat_array, true); + /* If the component type is a padded type made for a non-bit-packed array of scalars with reverse storage order, we need to propagate the reverse storage order to the padding type since it is the innermost enclosing |